forked from ISIA-DASHR/DASHR-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.js
38 lines (32 loc) · 852 Bytes
/
api.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
define(['./dash'], function(dash){
var AxthimaAPI = function (video,src,triggers,preselected_tracks)
{
this.dash = new dash(video,src,triggers, preselected_tracks);
}
AxthimaAPI.prototype.play = function()
{
this.dash.play();
}
AxthimaAPI.prototype.pause = function()
{
this.dash.pause();
}
AxthimaAPI.prototype.seek = function(t)
{
this.dash.setCurrentTime(t);
}
AxthimaAPI.prototype.paused = function()
{
return !this.dash.want_to_play;
}
AxthimaAPI.prototype.getBuffered = function()
{
//renvoit le temps max en buffer sans interruption depuis la position courante
return this.dash.getBuffered();
}
AxthimaAPI.prototype.switchRepresentation = function(type,id_aset, id_rep)
{
this.dash.ManualSwitchRepresentation(type,id_aset, id_rep);
}
return (AxthimaAPI);
});