1

I am using azure media player 2.3.11 min js version for video in .Net6 technolgy. The video is DRM protected and playing perfectly on Android and Ios(Mac). But in iPhone its behaviour is random, sometime video is playing and sometime getting black screen (not getting any error).

I'm using below code.

<video id="vid_1"
               class="azuremediaplayer amp-default-skin amp-big-play-centered video-upload-box vid2"
               controls
               width="640"
               height="400"
               poster="@Model.ThumbnailUrl"
               data-setup='{
                 "controls": true,
           "logo": { "enabled": false },
           "techOrder": ["html5FairPlayHLS","azureHtml5JS", "flashSS","silverlightSS", "html5"],
           "nativeControlsForTouch": false
           }'
               tabindex="0">
          <source src="@Model.VideoUrl"
                  data-setup='{
           "protectionInfo": [{"type": "PlayReady", "authenticationToken": "@Model.BearerToken"},
            {"type": "Widevine", "authenticationToken": "@Model.BearerToken"},
                    {"type":"FairPlay","certificateUrl" :"@Model.CertificateFilePath","authenticationToken": "@Model.BearerTokenFairPlay"}] ,
           "techOrder": ["html5FairPlayHLS","azureHtml5JS", "flashSS", "silverlightSS", "html5"]
                    }'
                  type="application/vnd.ms-sstr+xml" />
          <p class="amp-no-js">
            To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video
          </p>
        </video>
<link href="https://amp.azure.net/libs/amp/2.3.11/skins/amp-default/azuremediaplayer.min.css" rel="stylesheet">
<script src="https://amp.azure.net/libs/amp/2.3.11/azuremediaplayer.min.js"></script>

Do you guys have any idea, what i'm doing wrong.?

DarkBee
  • 16,592
  • 6
  • 46
  • 58

1 Answers1

0

UPDATE:

The sample stream you provided is working 100% of the time in iOS 16.2 in Safari browser for me. Note, I only tried my own phone, so that is not a big sample.

We would need To figure out a consistent repro on a specific version of iOS and the browser version (Safari) as well. Otherwise, it is difficult to track down what the issue is exactly that you are seeing.

johndeu
  • 2,494
  • 1
  • 11
  • 10
  • Thanks John for responding. Here is an example URL (https://nhl-nhlpawlp-video-stg.agilecollab.com) where we are using media services to host media and playing using Azure media player. Sometimes the video plays and while other times we just get a black screen. For your information we have put a timer of around 15 seconds to wait for data loaded event and then we raise an alert "We have encountered an issue in playing the video. Please try again." Heads up: You may need to play this (or other videos on the screen) for few times for the issue to occur. – Gitesh Mangla Jan 18 '23 at 12:36
  • Cool. Checking on this with the team now, and will update the answer when I get info. – johndeu Jan 18 '23 at 19:41
  • I tried the sample URL you provided allso in StackOverflow and it worked on my phone in Safari browser 100% of the time. Could not get it to fail ever. Maybe it is a phone version specific issue? I'm on iOS 16.2 It fails playback in Edge of course, but that is probably a known issue of lack of support for DRM in Edge on iOS. – johndeu Jan 18 '23 at 20:02
  • Did you try multiple videos with prev/next button? If not please try navigating to prev/next videos and playing again for few times. because on my end after some video play getting the alert "We have encountered an issue in playing the video. Please try again". – Gitesh Mangla Jan 19 '23 at 03:51