salman khaan
salman khaan

Reputation: 25

Azure media player not working

I am new to azure world,below is the code that i am trying to start with, i am not able to get the controls and always getting the loader, can u help me out in figuring out what i am missing.

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Azure Media Player</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!--*****START OF Azure Media Player Scripts*****-->
        <!--Note: DO NOT USE the "latest" folder in production. Replace "latest" with a version number like "1.0.0"-->
        <!--EX:<script src="//amp.azure.net/libs/amp/1.0.0/azuremediaplayer.min.js"></script>-->
        <!--Azure Media Player versions can be queried from //aka.ms/ampchangelog-->
    <link href="http://amp.azure.net/libs/amp/1.7.1/skins/amp-default/azuremediaplayer.min.css" rel="stylesheet">
    <script src="http://amp.azure.net/libs/amp/1.7.1/azuremediaplayer.min.js"></script>
    <script src="http://html5video.org/w/load.php?debug=false&amp;lang=en&amp;modules=startup&amp;only=scripts&amp;skin=html5video&amp;*"></script>
    <!--*****END OF Azure Media Player Scripts*****-->

</head>
<body>
    <h1>Sample: Logging</h1>
    <video id="azuremediaplayer" controls class="azuremediaplayer amp-default-skin amp-big-play-centered"  autoplay width="640" height="400"  data-setup='{ "techOrder": ["flashSS"]}' tabindex="0">
        <source src="http://amssamples.streaming.mediaservices.windows.net/91492735-c523-432b-ba01-faba6c2206a2/AzureMediaServicesPromo.ism/manifest" type="application/vnd.ms-sstr+xml" />
        
    </video>
    <footer>
        <br />
        <p>� Microsoft Corporation 2016</p>
    </footer>

</body>
</html>

Upvotes: 0

Views: 1961

Answers (2)

sraje
sraje

Reputation: 376

The Chrome issue is a limitation with the browser, I'm copying an answer I posted on an older question:

When you run the code locally, Chrome opens your index.html with the file:// protocol. Due to Chrome's security policy local resources aren't allowed to be loaded and that's what's preventing playback. (If you check out your JavaScript console, I bet you'll see a similar error.) To workaround this, you can use an IDE like Visual Studio or WebMatrix that will automatically set up a local web server for you so you can access your page with http://localhost:8000 or whichever port you prefer. If you don't want to use VS or WebMatrix, you could also use Python's Simple HTTP server

The fact that it isn't working in IE could be a couple things:

a) if you are copying the source code directly from the sample page then you're using un-pre-fixed URLS (//url vs http://url) which will not load correctly in IE

b) Internet explorer is blocking scripts or ActiveX controls, you can allow the blocked content by changing the security settings in your Internet Options

Let me know if this answers your question, happy coding :)

Upvotes: 0

forester123
forester123

Reputation: 1579

It's the data-setup='{ "techOrder": ["flashSS"]}' property in Video tag caused the problem, please set to data-setup='' as the source page videotag_setsource.html shows.

Upvotes: 1

Related Questions