Skip to content

Commit

Permalink
Use Web Audio volume fading only if player has getMediaElement
Browse files Browse the repository at this point in the history
`pagefow-vr` player does not support accessing the media element
directly.
  • Loading branch information
tf committed Sep 4, 2017
1 parent 948dc17 commit f6d6955
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pageflow.mediaPlayer.volumeFading = function(player) {
if (!pageflow.browser.has('volume control support')) {
return pageflow.mediaPlayer.volumeFading.noop(player);
}
else if (pageflow.audioContext.get()) {
else if (pageflow.audioContext.get() && player.getMediaElement) {
return pageflow.mediaPlayer.volumeFading.webAudio(
player,
pageflow.audioContext.get()
Expand Down

0 comments on commit f6d6955

Please sign in to comment.