Skip to content

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

@towerz

Description

@towerz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions