-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpattern.js
More file actions
28 lines (23 loc) · 709 Bytes
/
pattern.js
File metadata and controls
28 lines (23 loc) · 709 Bytes
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
/*
This is a pattern for media components supporting
timing objects as timingsrc.
Setting the timingsrc does not imply any complexity
for the programming of the media component, all of this
is handled by the implementation of timing objects.
All logic may therefore be developed by relative to this.to.
Setting the timingsrc only results in a "change" event from this.to,
*/
var MediaComponent = function (timingObject) {
this._to = timingObject;
};
/*
timingsrc property and switching on assignment
*/
Object.defineProperty(MediaComponent.prototype, 'timingsrc', {
get : function () {
return this._to.timingsrc;
},
set : function (timingsrc) {
this._to.timingsrc = timingsrc;
}
});