profile
viewpoint

Ask questionsNo videos appear on Safari

Your environment.

  • Version: d7110cc5fae5d793d78e280d8599c34cbcd623f2
  • Browser: iOS Safari 13

What did you do?

I started ion and ion-app-web on my vm. It worked fine on Chrome on my Mac.

What did you expect?

I expected to see my local video and the remote video.

What happened?

The widgets came up but no videos were visible.

IMG_0580

pion/ion-app-web

Answer questions ijt

Something along these lines:

export class Stream {
  // TODO: allow passing in a stream or array of tracks.
  // See https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/MediaStream.
  constructor() {
    this.mediaStream = new MediaStream();
  }
  
  // MediaStream fields and methods. Flesh these out.
  readonly active: boolean;
  readonly id: string;
  onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
  onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
  // For example:
  addTrack(track: MediaStreamTrack): void {
    this.mediaStream.addTrack(track); 
  }
  clone(): MediaStream;
  getAudioTracks(): MediaStreamTrack[];
  getTrackById(trackId: string): MediaStreamTrack | null;
  getTracks(): MediaStreamTrack[];
  getVideoTracks(): MediaStreamTrack[];
  removeTrack(track: MediaStreamTrack): void;
  addEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
  removeEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
  removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;

  // EventTarget methods. Flesh these out.
  addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
  dispatchEvent(event: Event): boolean;
  removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;

  // Stuff that is already in the Stream class...
}
useful!

Related questions

No questions were found.
Github User Rank List