Skip to content

Commit

Permalink
Bug 1322505 - part1 : rename audio channel wrapper's function. r=baku
Browse files Browse the repository at this point in the history
Rename function and modify the comment.

MozReview-Commit-ID: F5JTmPvH7GC

--HG--
extra : rebase_source : 7e0841809d5f338c071e9e7d56d9a7c3d4c7169f
  • Loading branch information
alastor0325 committed Jan 23, 2017
1 parent dd7df72 commit 6968ad6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dom/html/HTMLMediaElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,13 @@ class HTMLMediaElement::AudioChannelAgentCallback final :
}

void
NotifyPlayStarted()
NotifyPlayStateChanged()
{
MOZ_ASSERT(!mIsShutDown);
// Reset the suspend type because the media element might be paused by
// audio channel before calling play(). eg. paused by Fennec media control,
// but resumed it from page.
// When owner's play state changed, we should reset the suspend type. If
// owner is playing, the suspend type should be 'NONE_SUSPENDED', and if
// owner paused, the suspend type also needs to be reset because the agent
// maybe need to be unregistered.
SetSuspended(nsISuspendedTypes::NONE_SUSPENDED);
UpdateAudioChannelPlayingState();
}
Expand Down Expand Up @@ -7132,7 +7133,7 @@ HTMLMediaElement::UpdateCustomPolicyAfterPlayed()
{
OpenUnsupportedMediaWithExternalAppIfNeeded();
if (mAudioChannelWrapper) {
mAudioChannelWrapper->NotifyPlayStarted();
mAudioChannelWrapper->NotifyPlayStateChanged();
}
}

Expand Down

0 comments on commit 6968ad6

Please sign in to comment.