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

The first attempt to play HTTP/HLS failed, but it worked after refreshing the page #8958

Open
mxzhu opened this issue Jan 15, 2025 · 1 comment
Labels
needs: triage This issue needs to be reviewed

Comments

@mxzhu
Copy link

mxzhu commented Jan 15, 2025

Description

During the initial playback, only the first corresponding .ts data for the .m3u8 was downloaded, and afterwards, it kept downloading only the .m3u8 (without downloading the corresponding .ts files). However, after downloading the .m3u8 several times and then refreshing the current page, the video was able to play normally, with both the .m3u8 and the corresponding .ts files downloading correctly.

Image

Image

Image

Reduced test case

https://codepen.io/mx-zhu/pen/PwYevYx

Steps to reproduce

1.Play video upon page loading.
2.Wait until at least two .m3u8 files have been downloaded, then refresh the page.

Errors

videojs.log.history() log

[
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "PlaybackWatcher >",
        "initialize"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "PlaylistLoader >",
        "m3u8-parser info for http://10.219.12.83:8081/hisrecord/test23/hls.m3u8?vhost=__defaultVhost__: defaulting discontinuity sequence to zero"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "playlist update [null => 0-http://10.219.12.83:8081/hisrecord/test23/hls.m3u8?vhost=__defaultVhost__]"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "Playlist update:\ncurrentTime: 0\nbufferedEnd: undefined\n",
        "\n10/34-24_0.ts | Media Sequence: 0 | Range: 0 --> 3.94 | Appended: false\n"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "pc >",
        "seekable updated [0 => 0]"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SourceUpdater >",
        "Setting mediaSource duration to 0"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "INIT -> READY"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "skipping remove because no source updater or starting media info"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SyncController >",
        "Strategy: MediaSequence. Current time: 0. selected segment: 0. Time: [0 -> 3.94]}"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SyncController >",
        "Found sync point with exact match: ",
        {
            "time": 0,
            "partIndex": null,
            "segmentIndex": 0,
            "strategy": "MediaSequence"
        }
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "chooseNextRequest_ request after Quality Switch:\nFor TargetTime: 0.\nCurrentTime: 0\nBufferedEnd: 0\nFetch At Buffer: false\n",
        "\n10/34-24_0.ts | Media Sequence: 0 | Range: 0 --> 3.94 | Appended: false\n"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "chooseNextRequest_ mediaSequence syncInfo (0 --> 3.94)"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "choose next request. Playlist switched and we have a sync point. Media Index: 0 "
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "choose next request. Force timestamp offset after loader resync"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "READY -> WAITING"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "Requesting\n10/34-24_0.ts\nsegment [0/0] segment start/end [undefined => undefined] startOfSegment [0] duration [3.94] timeline [0] selected by [getMediaInfoForTime (currentTime 0)] playlist [0-http://10.219.12.83:8081/hisrecord/test23/hls.m3u8?vhost=__defaultVhost__]"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "trackinfo update",
        {
            "hasAudio": false,
            "hasVideo": true,
            "isMuxed": false
        }
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SourceUpdater >",
        "Adding videoBuffer with codec avc1.4d400d to mediaSource"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "timinginfo: video - start - 23693.1466"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "timinginfo: video - end - 23697.1486"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SourceUpdater >",
        "Setting videotimestampOffset to -23693.1466"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SourceUpdater >",
        "Appending segment 0's 100383 bytes to videoBuffer"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "WAITING -> APPENDING"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SourceUpdater >",
        "received \"updateend\" event for video Source Buffer: ",
        "Buffered Ranges: \n0 --> 47725.860844. Duration (47725.860844)\n"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SyncController >",
        "time mapping for timeline 0: [time: 0] [mapping: -23693.1466]"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "APPENDING -> READY"
    ],
    [
        "VIDEOJS:",
        "DEBUG:",
        "VHS:",
        "SegmentLoader[main] >",
        "Appended segment [0/0] segment start/end [0 => 4.0020000000004075] startOfSegment [0] duration [3.94] timeline [0] selected by [getMediaInfoForTime (currentTime 0)] playlist [0-http://10.219.12.83:8081/hisrecord/test23/hls.m3u8?vhost=__defaultVhost__]"
    ]
]

What version of Video.js are you using?

8.21.0

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

Chromium 94.0.4606.71

What OS(es) and version(s) does this occur with?

windows server 2012 r2 Datacenter

@mxzhu mxzhu added the needs: triage This issue needs to be reviewed label Jan 15, 2025
Copy link

welcome bot commented Jan 15, 2025

👋 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage This issue needs to be reviewed
Projects
None yet
Development

No branches or pull requests

1 participant