E
E
Eugene2019-09-13 18:23:39
JavaScript
Eugene, 2019-09-13 18:23:39

How to play Instagram Live in a browser?

Hello, I will immediately describe the essence of the issue:
There is an Android application on Cordova (in short, WebView) and there is a link to Instagram Live (dash) of this type:

https://scontent-waw1-1.cdninstagram.com/hvideo-frc2/v/rHl86LIgrVZJcv3fJhHpj/live-dash/dash-hd/17847518473615152.mpd?_nc_rl=AfBccp26lxhOb2V1&oh=e29e3bbbb450c6052338a4e3d09dd0c1&oe=5D7DBEBF

And there is a code in HTML + JS
index.html

<!DOCTYPE html>

<html>
    <head>
        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover">
    </head>
    <body style="margin: auto;">
<div>
            <video id="videoPlayer" controls autoplay preload="auto" style="width: 360px;position: fixed;height: 100vh;min-height: 100%;object-fit: fill;"></video>
        </div>
    <script type="text/javascript" src="cordova.js"></script>
    <script src="https://cdn.dashjs.org/latest/dash.all.min.js"></script>
    <script>
      var player = dashjs.MediaPlayer().create();
      player.initialize(document.querySelector("#videoPlayer"), null, true);
      player.attachSource("https://scontent-waw1-1.cdninstagram.com/hvideo-frc2/v/rHl86LIgrVZJcv3fJhHpj/live-dash/dash-hd/17847518473615152.mpd?_nc_rl=AfBccp26lxhOb2V1&oh=e29e3bbbb450c6052338a4e3d09dd0c1&oe=5D7DBEBF");
    </script>
    </body>
</html>


The problem arises that when playing the broadcast, there are jerks in the video and a pause is put for a fraction of a second, tell me, perhaps dash.js is not configured correctly?
Videos problems

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question