Skip to content

Using browser native video API in chrome to reload video result in: Error Code: MEDIA_ERR_SRC_NOT_SUPPORTED #116

@bohdanafanasyev

Description

@bohdanafanasyev

Description

Currently, in the project, we rely on the Video API TimeRangesto extract data for the analytics purpose. When the video comes to the end we need to reset the already played TimeRanges and we do it by calling load method directly on the <video> element.

It used to work in the past with Brightcove player, but recently Chrome started to instantly react with the MEDIA_ERR_SRC_NOT_SUPPORTED error. You can observe this behavior in the following codepen by clicking on the load button near the player:
https://codepen.io/bohdanafanasyev/pen/JjYZbwV

Personal Investigation

I've started investigating first on the video.js side and have found a reported issue, where it's explained that video has to have provided type in order to be accepted by chrome.
videojs/video.js#5606

I've tried out the approach of providing initial source in HTML code for the video and calling the load method on it doesn't result in the error, can be tested in the following codepen:
https://codepen.io/bohdanafanasyev/pen/RwWJYZy

I've checked the result of HTML code the Brightcove generates into the page and there is no <source> elements that could give a hint to the video.js what type the video actually has.

Sidenote

The issue doesn't reveal itself in Safari and Firefox

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Add Brightcove video the to page
  2. Using JS call native video API load method on <video>

Results

Expected

Video gets reloaded

Actual

The following error occurs:
This video is either unavailable or not supported in this browser
Error Code: MEDIA_ERR_SRC_NOT_SUPPORTED

Error output

If there are any errors at all, please include them here.

Additional Information

Screenshot 2020-05-12 at 11 06 36

versions

Brightcove player

6.33.1

videojs

7.5.3

browsers

Chrome Version 81.0.4044.138 (Official Build) (64-bit)

OSes

Mac OS Mojave 10.14.4

plugins

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions