Open Bug 1664792 Opened 5 years ago Updated 5 years ago

Embedded video won't play at sbs.com.au

Categories

(Core :: Audio/Video: Playback, defect, P3)

80 Branch
defect

Tracking

()

People

(Reporter: forums.github, Unassigned)

Details

(Keywords: webcompat:site-wait)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

Embedded video at sbs.com.au/cyclingcentral pages to not play.

Example link:
https://www.sbs.com.au/cyclingcentral/video/1788049475999/Winning-moment-Stage-14

Numerous other videos which likewise do not play can be found at parent site:
https://www.sbs.com.au/cyclingcentral/

Tested same link in brand new FF profile with zero user modifications and video still would not play.

System is Ubuntu 20.04.1 LTS.
FF 80.0.1 (64 bit) installed from repos.

Identical problem manifests on Ubuntu 18.04.5 LTS, FF 80.0.1 (64 bit) installed from repos.

Also tested in Brave browser. Installed Brave browser via Snap.
Version 1.13.82 Chromium: 85.0.4183.83 (Official Build) (64-bit)

Brave played videos from this site at first attempt.

Actual results:

This is the behaviour I see:
After I click the play button in the lower left of the embedded frame the video begins to load. The beginning of an ad flashes into the video box but cuts out before playing. The video box is then loaded with the first shot of vision I wish to view but does not play.

Expected results:

Video should play.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

I tried the link on Mac and it won't play either. Firefox on Android plays the video when requesting desktop site, though.

The devtools network panel shows that the page downloads some m3u8 and m2ts files so I guess it serves HLS contents. We don't officially support HLS outside Android and rely on sites to use JS solutions such as hls.js on unsupported platforms. Unfortunately, I cannot tell whether the site script support Firefox or not.

Karl, could you guys help reach out? Thanks a lot!

Flags: needinfo?(kdubost)

Before posting this bug I put a query to Mozilla Support regarding videos from sbs.com.au not playing in FF. A couple of days after submitting my query I received a response from site moderator cor-el.

cor-el suggested changing autoplay permissions for sbs.com.au.
Doing this permits embedded videos at the site to play in FF.

FF is my workhorse browser. When visiting other sites with FF's default autoplay settings unchanged, embedded videos will play when I direct them to but they do not autoplay when a loaded tab from such a site is opened.

This does not occur at sbs.com.au though. Videos at that site will not play unless autoplay permission is given for the site. When video & audio permission has been given for sbs.com.au the leading videos at sbs.com.au/cyclingcentral pages autoplay. If additional embedded video is present on one of these pages it plays when play button of embedded player is clicked.

This behaviour may have something to do with the manner in which media elements at the sbs.com.au website have been implemented/constructed/designed.

Thanks a lot for the update, Leonov65! I unblocked autoplay on my Mac and got the same result as you.

I also found that, with autoplay blocked, although clicking on the "play button" does not play (and no new 'NotAllowedError' shown in console) , clicking anywhere on the "timeline" somehow triggers the user interaction condition and the video will start to play from the seek position.

Karl, I think we still need your help to figure out why the "play button" doesn't work as expected when autoplay blocked.

keeping myself in the loop. but acknowledging the issue. I'm having a busy transition week mike -> karl.

Ah in Bug 1610003, Ksenia had tried to spoof the UA to make it work, but there was still an issue.
Initially related to https://webcompat.com/issues/47107

So yes probably the initialization phase might be in conflict with the autoplay thing. That would be interesting to discover what is happening here, because that might impact other sites using a similar technique.

John Lin, On Firefox side, does "blocking autoplay" also blocks the detection of video support or just the ability to play?

Flags: needinfo?(kdubost)
Flags: needinfo?(kberezina)
Flags: needinfo?(jolin)

(In reply to Karl Dubost💡 :karlcow from comment #6)

John Lin, On Firefox side, does "blocking autoplay" also blocks the detection of video support or just the ability to play?

AIUI, it only affects play(). canPlayType() will return the same result no matter what.

Flags: needinfo?(jolin)

Link to the video https://www.sbs.com.au/ondemand/video/single/1788049475999/?source=drupal&vertical=cyclingcentral&autoPlay=1

This is also reproducible in Chrome for me. On initial load the ad plays right away, so does the video. After I refresh the page, the video stuck and play button does nothing, similarly to Firefox. With that being the case it's hard to diagnose the difference between Firefox and Chrome, but this is most likely an issue on sbs.com.au side.

In Firefox on page load mediaStart function is executed, where pdkControls.states.mediaIsPlaying set to true, and then later on it's being used in click handler of the play button:

            togglePlayPause: function() {
                if(
                    embeddedPlayer.plugins.pdkcontrols.states.mediaIsPlaying === false
                    && embeddedPlayer.plugins.pdkcontrols.states.mediaCompleted === true
                ) {
                    $pdk.controller.clickPlayButton();
                } else {
                    $pdk.controller.pause(embeddedPlayer.plugins.pdkcontrols.states.mediaIsPlaying);
                }
            }

As a result of the above condition $pdk.controller.pause(embeddedPlayer.plugins.pdkcontrols.states.mediaIsPlaying); is called with true, and then pause function receives that as a parameter. Therefore this.doPauseVideo is executed each time we click on the play button:

  pause: function (c, d) {
    if (this.video) {
      this.player.pauseUserInitiated = !!d;
      if (c) {
        this.doPauseVideo(d)
      } else {
        this.doUnPauseVideo(d)
      }
    }
  },

So basically there is an attempt to pause video each time we click on the play button, because of the initial assumption that the video is playing, when in fact it is not. I think we should contact sbs to see if they can get this fixed

Flags: needinfo?(kberezina)

Triaging to remove from media queue.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.