Failed to execute 'createObjectURL' on 'URL':

后端 未结 8 1334
暗喜
暗喜 2020-11-27 10:52

Display Below error in Safari.

Failed to execute \'createObjectURL\' on \'URL\': No function was found that matched the signature provided.

8条回答
  •  半阙折子戏
    2020-11-27 11:44

    Video with fall back:

    try {
      video.srcObject = mediaSource;
    } catch (error) {
      video.src = URL.createObjectURL(mediaSource);
    }
    video.play();
    

    From: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject

提交回复
热议问题