mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: platform library imported in all required classes
parent
d7b5b41ed8
commit
0e80c9b626
|
@ -17,6 +17,8 @@
|
|||
|
||||
import { Stream } from './Stream';
|
||||
import { LocalRecorderState } from '../OpenViduInternal/Enums/LocalRecorderState';
|
||||
import platform = require('platform');
|
||||
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
|
@ -37,10 +39,8 @@ export class LocalRecorder {
|
|||
private mediaRecorder: any;
|
||||
private chunks: any[] = [];
|
||||
private blob: Blob;
|
||||
private count = 0;
|
||||
private id: string;
|
||||
private videoPreviewSrc: string;
|
||||
private htmlParentElementId: string;
|
||||
private videoPreview: HTMLVideoElement;
|
||||
|
||||
/**
|
||||
|
@ -207,14 +207,11 @@ export class LocalRecorder {
|
|||
}
|
||||
|
||||
if (typeof parentElement === 'string') {
|
||||
this.htmlParentElementId = parentElement;
|
||||
|
||||
const parentElementDom = document.getElementById(parentElement);
|
||||
if (parentElementDom) {
|
||||
this.videoPreview = parentElementDom.appendChild(this.videoPreview);
|
||||
}
|
||||
} else {
|
||||
this.htmlParentElementId = parentElement.id;
|
||||
this.videoPreview = parentElement.appendChild(this.videoPreview);
|
||||
}
|
||||
|
||||
|
@ -231,7 +228,6 @@ export class LocalRecorder {
|
|||
const f = () => {
|
||||
delete this.blob;
|
||||
this.chunks = [];
|
||||
this.count = 0;
|
||||
delete this.mediaRecorder;
|
||||
this.state = LocalRecorderState.READY;
|
||||
};
|
||||
|
|
|
@ -31,7 +31,6 @@ import * as screenSharing from '../OpenViduInternal/ScreenSharing/Screen-Capturi
|
|||
|
||||
import RpcBuilder = require('../OpenViduInternal/KurentoUtils/kurento-jsonrpc');
|
||||
import platform = require('platform');
|
||||
|
||||
platform['isIonicIos'] = (platform.product === 'iPhone' || platform.product === 'iPad') && platform.ua!!.indexOf('Safari') === -1;
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,6 +28,9 @@ import { VideoElementEvent } from '../OpenViduInternal/Events/VideoElementEvent'
|
|||
import { OpenViduError, OpenViduErrorName } from '../OpenViduInternal/Enums/OpenViduError';
|
||||
import { VideoInsertMode } from '../OpenViduInternal/Enums/VideoInsertMode';
|
||||
|
||||
import platform = require('platform');
|
||||
platform['isIonicIos'] = (platform.product === 'iPhone' || platform.product === 'iPad') && platform.ua!!.indexOf('Safari') === -1;
|
||||
|
||||
/**
|
||||
* Packs local media streams. Participants can publish it to a session. Initialized with [[OpenVidu.initPublisher]] method
|
||||
*/
|
||||
|
|
|
@ -41,7 +41,7 @@ import { OpenViduError, OpenViduErrorName } from '../OpenViduInternal/Enums/Open
|
|||
import { VideoInsertMode } from '../OpenViduInternal/Enums/VideoInsertMode';
|
||||
|
||||
import EventEmitter = require('wolfy87-eventemitter');
|
||||
|
||||
import platform = require('platform');
|
||||
|
||||
/**
|
||||
* Represents a video call. It can also be seen as a videoconference room where multiple users can connect.
|
||||
|
|
|
@ -27,10 +27,12 @@ import { WebRtcPeer, WebRtcPeerSendonly, WebRtcPeerRecvonly, WebRtcPeerSendrecv
|
|||
import { WebRtcStats } from '../OpenViduInternal/WebRtcStats/WebRtcStats';
|
||||
import { PublisherSpeakingEvent } from '../OpenViduInternal/Events/PublisherSpeakingEvent';
|
||||
import { StreamPropertyChangedEvent } from '../OpenViduInternal/Events/StreamPropertyChangedEvent';
|
||||
import { OpenViduError, OpenViduErrorName } from '../OpenViduInternal/Enums/OpenViduError';
|
||||
|
||||
import EventEmitter = require('wolfy87-eventemitter');
|
||||
import hark = require('hark');
|
||||
import { OpenViduError, OpenViduErrorName } from '../OpenViduInternal/Enums/OpenViduError';
|
||||
import platform = require('platform');
|
||||
platform['isIonicIos'] = (platform.product === 'iPhone' || platform.product === 'iPad') && platform.ua!!.indexOf('Safari') === -1;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,8 @@ import { VideoElementEvent } from '../OpenViduInternal/Events/VideoElementEvent'
|
|||
import { VideoInsertMode } from '../OpenViduInternal/Enums/VideoInsertMode';
|
||||
|
||||
import EventEmitter = require('wolfy87-eventemitter');
|
||||
|
||||
import platform = require('platform');
|
||||
platform['isIonicIos'] = (platform.product === 'iPhone' || platform.product === 'iPad') && platform.ua!!.indexOf('Safari') === -1;
|
||||
|
||||
/**
|
||||
* Interface in charge of displaying the media streams in the HTML DOM. This wraps any [[Publisher]] and [[Subscriber]] object.
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
import freeice = require('freeice');
|
||||
import uuid = require('uuid');
|
||||
import platform = require('platform');
|
||||
platform['isIonicIos'] = (platform.product === 'iPhone' || platform.product === 'iPad') && platform.ua!!.indexOf('Safari') === -1;
|
||||
|
||||
export interface WebRtcPeerConfiguration {
|
||||
mediaConstraints: {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
// tslint:disable:no-string-literal
|
||||
|
||||
import { Stream } from '../../OpenVidu/Stream';
|
||||
import platform = require('platform');
|
||||
|
||||
export class WebRtcStats {
|
||||
|
||||
|
|
Loading…
Reference in New Issue