|
@@ -3,7 +3,11 @@ JSMpeg.Player = (function(){ "use strict";
|
3
|
3
|
var Player = function(url, options) {
|
4
|
4
|
this.options = options || {};
|
5
|
5
|
|
6
|
|
- if (url.match(/^wss?:\/\//)) {
|
|
6
|
+ if (options.source) {
|
|
7
|
+ this.source = new options.source(url, options);
|
|
8
|
+ options.streaming = !!this.source.streaming;
|
|
9
|
+ }
|
|
10
|
+ else if (url.match(/^wss?:\/\//)) {
|
7
|
11
|
this.source = new JSMpeg.Source.WebSocket(url, options);
|
8
|
12
|
options.streaming = true;
|
9
|
13
|
}
|