vime-js / vime

Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
https://vimejs.com
MIT License
2.75k stars 154 forks source link

Can't play YouTube video only in Safari #293

Open RustemRiz opened 2 years ago

RustemRiz commented 2 years ago

I wrote player component (React).

import React from 'react';
import { Player, Youtube, DefaultUi, ViewType } from '@vime/react';
import { getYoutubeVideoId } from 'utils';

const Player = ({ src, playerRef, onPause, onPlay, onError, style }) => {
  const id = getYoutubeVideoId(src);
  return id ? (
    <Player
      ref={playerRef}
      viewType={ViewType.Video}
      style={style}
      onVmPlay={onPlay}
      onVmPausedChange={onPause}
      onVmError={onError}
    >
      <Youtube videoId={id} />
      <DefaultUi />
    </Player>
  ) : null;
};

export default Player;

Actual result: Video don't play and throw errors, but onVmError don't triggered [Error] Failed to preconnect to https://googleads.g.doubleclick.net/. Error: An SSL error has occurred and a secure connection to the server cannot be made. [Error] Failed to preconnect to https://static.doubleclick.net/. Error: An SSL error has occurred and a secure connection to the server cannot be made. Expected result: Video start