videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
38k stars 7.45k forks source link

Event 'loadedmetadata' not firing on v7.6.3 #6193

Closed slashtu closed 4 years ago

slashtu commented 5 years ago

Description

I've upgraded video.js from v7.5.3 to v7.6.3. The behavior of playlist switching is changed. After investigating, probably is @videojs/http-streaming 1.9.3 -> 1.10.3

Steps to reproduce

source: https://asia.messages.swag.live/5d5d7cf49c6065af0aac76cc.mpd

id 0: public id 1: authorization required, get 403

<?xml version="1.0" encoding="utf-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="urn:mpeg:dash:schema:mpd:2011"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
    profiles="urn:mpeg:dash:profile:isoff-live:2011"
    type="static"
    mediaPresentationDuration="PT29.9S"
    minBufferTime="PT2.0S">
    <ProgramInformation>
    </ProgramInformation>
    <Period start="PT0.0S">
        <AdaptationSet contentType="video" segmentAlignment="true" bitstreamSwitching="true" maxFrameRate="30/1">
            <Representation id="0" mimeType="video/mp4" codecs="avc1.4d4028" bandwidth="384467" width="720" height="1280" frameRate="24/1">
                <SegmentTemplate timescale="12288" initialization="5d5d7cf49c6065af0aac76cc-$RepresentationID$-00000.mp4" media="5d5d7cf49c6065af0aac76cc-$RepresentationID$-$Number%05d$.m4s" startNumber="1">
                    <SegmentTimeline>
                        <S t="0" d="30720" r="10" />
                        <S d="30208" />
                    </SegmentTimeline>
                </SegmentTemplate>
            </Representation>
            <Representation id="1" mimeType="video/mp4" codecs="avc1.4d4028" bandwidth="832884" width="720" height="1280" frameRate="24/1">
                <SegmentTemplate timescale="12288" initialization="5d5d7cf49c6065af0aac76cc-$RepresentationID$-00000.mp4" media="5d5d7cf49c6065af0aac76cc-$RepresentationID$-$Number%05d$.m4s" startNumber="1">
                    <SegmentTimeline>
                        <S t="0" d="30720" r="10" />
                        <S d="30208" />
                    </SegmentTimeline>
                </SegmentTemplate>
            </Representation>
            <Representation id="2" mimeType="video/mp4" codecs="avc1.4d4028" bandwidth="5864514" width="720" height="1280" frameRate="30/1">
                <SegmentTemplate timescale="15360" initialization="5d5d7cf49c6065af0aac76cc-$RepresentationID$-00000.mp4" media="5d5d7cf49c6065af0aac76cc-$RepresentationID$-$Number%05d$.m4s" startNumber="1">
                    <SegmentTimeline>
                        <S t="0" d="30720" r="14" />
                    </SegmentTimeline>
                </SegmentTemplate>
            </Representation>
        </AdaptationSet>
        <AdaptationSet contentType="audio" segmentAlignment="true" bitstreamSwitching="true">
            <Representation id="3" mimeType="audio/mp4" codecs="mp4a.40.2" bandwidth="96032" audioSamplingRate="44100">
                <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" />
                <SegmentTemplate timescale="44100" initialization="5d5d7cf49c6065af0aac76cc-$RepresentationID$-00000.mp4" media="5d5d7cf49c6065af0aac76cc-$RepresentationID$-$Number%05d$.m4s" startNumber="1">
                    <SegmentTimeline>
                        <S t="0" d="87040" />
                        <S d="88064" r="1" />
                        <S d="89088" />
                        <S d="88064" r="5" />
                        <S d="89088" />
                        <S d="88064" r="2" />
                        <S d="87007" />
                    </SegmentTimeline>
                </SegmentTemplate>
            </Representation>
        </AdaptationSet>
    </Period>
</MPD>

v7.5.3

  1. Event loadstart firing

  2. get id=1 playlist get https://asia.messages.swag.live/5d5d7cf49c6065af0aac76cc-1-00000.mp4, return 403 get https://asia.messages.swag.live/5d5d7cf49c6065af0aac76cc-1-00001.m4s, return 403

  3. Automatically switch to id=0 playlist get https://asia.messages.swag.live/5d5d7cf49c6065af0aac76cc-0-00000.mp4 get https://asia.messages.swag.live/5d5d7cf49c6065af0aac76cc-0-00001.m4s

  4. Event loadeddata firing

  5. works, play id=0 playlist

v7.6.3

  1. Event loadstart firing

  2. get id=1 playlist get https://asia.messages.swag.live/5d5d7cf49c6065af0aac76cc-1-00000.mp4, return 403 get https://asia.messages.swag.live/5d5d7cf49c6065af0aac76cc-1-00001.m4s, return 403

  3. Doesn't switch to id=0 playlist

  4. Event loadeddata not firing

Results

Expected

Should switch to public playlist

Actual

v7.6.3 doesn't work

Additional Information

I try to print some info in @videojs/http-streaming In blacklistCurrentPlaylist, print nextPlaylist

v7.5.3

the nextPlaylist is id=0 public playlist

v7.6.3

the nextPlaylist is id=1 authorization required playlist

welcome[bot] commented 5 years ago

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.