https://discord.cloudflare.com logo
Join Discord
Powered by
# stream
  • i

    Isaac McFadyen | YYZ01

    07/29/2022, 3:06 PM
    But most need a player
  • i

    Isaac McFadyen | YYZ01

    07/29/2022, 3:06 PM
    https://caniuse.com/http-live-streaming which shows support for native
    video
    tags and says "HLS can be used with a JavaScript library in browsers that doesn't support it natively as long as they support Media Source Extensions."
  • j

    joshh

    07/29/2022, 3:07 PM
    right
  • j

    joshh

    07/29/2022, 3:07 PM
    I see
  • j

    joshh

    07/29/2022, 3:07 PM
    thanks
  • i

    Isaac McFadyen | YYZ01

    07/29/2022, 3:07 PM
    NP 👍
  • j

    joshh

    07/29/2022, 3:11 PM
    @Isaac McFadyen | YYZ01 is dash.js good? https://github.com/Dash-Industry-Forum/dash.js/
  • i

    Isaac McFadyen | YYZ01

    07/29/2022, 3:12 PM
    Personally I prefer https://videojs.com/ but it depends on what you need.
  • j

    joshh

    07/29/2022, 3:22 PM
    Is there a way to speed up how fast the Cloudflare stream loads?
  • j

    joshh

    07/29/2022, 3:22 PM
    it seems to take a few seconds
  • j

    joshh

    07/29/2022, 3:22 PM
    which is a little annoying
  • j

    joshh

    07/29/2022, 3:41 PM
    Copy code
    const player = Stream(document.getElementById('stream'));
        player.addEventListener('play', () => {
            console.log('playing!');
        });
        player.play().catch(() => {
            console.log('playback failed, muting to try again');
            player.muted = true;
            player.play();
        });
    Copy code
    <iframe
                    src={`https://iframe.videodelivery.net/${id}/watch?preload=metadata&controls=false`}
                    style={{width:"100%",height:"100%",border:'none'}}
                    controls={false}
                    className={props.className}
                    allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;"
                    allowfullscreen="true"
                    id="stream"
                ></iframe>
    I get a "player is null" error in the console.
  • k

    Kyle_Cloudflare

    07/30/2022, 2:26 AM
    depends on what's being slow for you! the player in the iframe? harder to speedup but we'd love to make it faster. The actual video content itself? You can request the content preload before the user hits play; note that preloaded video content will be billed, so its a tradeoff.
    preload
    attribute docs here if you're using our player https://developers.cloudflare.com/stream/viewing-videos/using-the-stream-player/#basic-options (preload applies only to video on demand AFAIK, live video will load faster with more viewers)
  • j

    joshh

    07/30/2022, 2:55 AM
    The actual video loading, I did set the preload to metadata (and also tried auto) while that helped the immediate playback of 0:00, it still takes a few seconds to load when you skip forward a lot.
    k
    • 2
    • 1
  • i

    Isaac McFadyen | YYZ01

    07/30/2022, 2:24 PM
    Hey, just a heads-up that you can type
    /cfrole
    into any channel in this server (it will only be visible to you) to get a verified orange role. 🙂
  • i

    Isaac McFadyen | YYZ01

    07/30/2022, 2:25 PM
    Loading when skipping forward is partly just how HLS works. Not only does it have to load from the network, it has to parse it and compute the deltas between frames (because the video is compressed).
  • i

    Isaac McFadyen | YYZ01

    07/30/2022, 2:26 PM
    Because sending the entire frame every time would require a multi-gigabit network connection, modern video compresses by simply sending the changes between frames (somewhat of a simplification) but that also means the browser has to go back and compute those changes over time when you skip forward.
  • t

    Troy

    08/01/2022, 5:03 PM
    Hi
  • t

    Troy

    08/01/2022, 5:04 PM
    i was curious about the pricing, is it $1 per 1000 mins delivered or $1 per 1000mins streamed? or both
  • t

    Troy

    08/01/2022, 5:04 PM
    it seems that some places mention steamed mins and some mention delivered
  • t

    Troy

    08/01/2022, 5:05 PM
    like here
  • i

    Isaac McFadyen | YYZ01

    08/01/2022, 5:06 PM
    Delivered.
  • i

    Isaac McFadyen | YYZ01

    08/01/2022, 5:06 PM
    So if the player prebuffers it, that counts for your minutes.
  • i

    Isaac McFadyen | YYZ01

    08/01/2022, 5:06 PM
    If it's playing in the background, that also counts.
  • i

    Isaac McFadyen | YYZ01

    08/01/2022, 5:06 PM
    Basically if the user gets the video onto their browser in any way, it counts.
  • t

    Troy

    08/01/2022, 5:06 PM
    what about if its live to an live output?
  • i

    Isaac McFadyen | YYZ01

    08/01/2022, 5:07 PM
    Same.
  • t

    Troy

    08/01/2022, 5:07 PM
    like if its used to restream to twitch?
  • t

    Troy

    08/01/2022, 5:07 PM
    i see is it per output
  • i

    Isaac McFadyen | YYZ01

    08/01/2022, 5:07 PM
    If it's restreamed to multiple destinations, they each count yeah.
1...303132...105Latest