Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FlasHLS] Inconsistent state when pausing immediately after calling play #9

Open
towerz opened this issue Apr 9, 2016 · 3 comments

Comments

@towerz
Copy link
Member

towerz commented Apr 9, 2016

When discussing some details on how to detect whether FlasHLS is enabled for a given source, @mikeevstropov discovered that calling player.play(); player.pause() doesn't work correctly.

I tried checking on http://cdn.clappr.io and the playback seemingly tries to pause before loading the source, instead of delaying it. I ran the following code:

var player = new Clappr.Player({
  source: 'http://www.streambox.fr/playlists/x36xhzz/x36xhzz.m3u8',
  parentId: '#player-wrapper',
  baseUrl: '/latest',
  poster: 'http://clappr.io/poster.png',
  mute: true,
  height: 360,
  width: 640,
  plugins: [Clappr.FlasHLS]
});

And instead of interacting, I ran the following on the console:

> player.play();player.pause()
VM4200:1 INFO:FlasHLS Clappr (version: 0.4.13 - flashls: 0.4.4.20, id: o88)
VM4201:1 INFO:HLSNetStream:close
VM4202:1 INFO:HLSNetStream:pause
VM4207:1 INFO:HLSNetStream:play(-1)
VM4208:1 INFO:HLSNetStream:seek(-1)
VM4218:1 INFO:Setting audio track to 0
VM4219:1 INFO:enough download bandwidth, adjust start level from 0 to 4
VM4249:1 INFO:Video decoding:software
> console.log(player.core.getCurrentPlayback().currentState)
VM4273:2 PLAYING

Note that the expected behavior is that the playback would be in the PAUSED or PAUSED_BUFFERING state.

@mikeevstropov
Copy link

And. When player.play is calling after CONTAINER_LOADEDMETADATA event, it works correctly.

player.play();
player.listenToOnce(
    player.core.getCurrentContainer(),
    Clappr.Events.CONTAINER_LOADEDMETADATA,
    function () { player.pause() }
);

@iongion
Copy link

iongion commented Jul 20, 2016

If I do what @mikeevstropov uses, I get this:

The play() request was interrupted by a call to pause()

I try to load an m3u8, wait for metadata and then immediately pause and seek to 0

@leandromoreira
Copy link
Member

@iongion this issue is a chrome related and known issue https://bugs.chromium.org/p/chromium/issues/detail?id=593273

@joaopaulovieira joaopaulovieira transferred this issue from clappr/clappr Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants