@@ -9,25 +9,19 @@ var config = {
9
9
return Promise . resolve ( request ) ;
10
10
} ,
11
11
preprocessHttpResponse : function ( type , response ) {
12
- if ( type === bitmovin . player . HttpRequestType . DRM_LICENSE_PLAYREADY
13
- || type === bitmovin . player . HttpRequestType . DRM_LICENSE_FAIRPLAY
14
- ) {
15
-
12
+ if ( type === bitmovin . player . HttpRequestType . DRM_LICENSE_PLAYREADY ) {
13
+
16
14
// Something to extracts expiration dates.
17
15
setTimeout ( ( ) => { player . drm . renewLicense ( licenseId ) } , 600000 ) ; // TODO set Renewal Interval milliseconds ( 10 minute )
18
16
19
17
}
20
- } ,
21
- tweaks : {
22
- prefer_managed_media_source : true // ManagedMediaSource 사용 활성화
23
18
}
24
19
}
25
20
}
26
21
27
22
28
23
var source = {
29
- // dash: dashUri,
30
- hls : hlsUri ,
24
+ dash : dashUri ,
31
25
drm : {
32
26
widevine : {
33
27
LA_URL : licenseUri ,
@@ -37,25 +31,6 @@ var source = {
37
31
} ,
38
32
playready : {
39
33
LA_URL : licenseUri ,
40
- } ,
41
- fairplay : {
42
- LA_URL : licenseUri ,
43
- certificateURL : fairplayCertUri ,
44
- prepareContentId : function ( contentId ) {
45
- return contentId . substring ( contentId . indexOf ( 'skd://' ) + 6 ) ;
46
- } ,
47
- prepareCertificate : function ( rawResponse ) {
48
- var responseText = String . fromCharCode . apply ( null , new Uint8Array ( rawResponse ) ) ;
49
- var raw = window . atob ( responseText ) ;
50
- var rawLength = raw . length ;
51
- var certificate = new Uint8Array ( new ArrayBuffer ( rawLength ) ) ;
52
-
53
- for ( var i = 0 ; i < rawLength ; i ++ )
54
- certificate [ i ] = raw . charCodeAt ( i ) ;
55
-
56
- return certificate ;
57
- } ,
58
- useUint16InitData : true
59
34
}
60
35
}
61
36
} ;
@@ -112,10 +87,5 @@ checkSupportedDRM().then(()=> {
112
87
function ( reason ) {
113
88
console . log ( 'Error while creating Bitmovin Player instance' ) ;
114
89
}
115
- ) ;
116
-
117
- // FairPlay 라이선스 갱신 이벤트 리스너 (옵션)
118
- player . on ( bitmovin . player . PlayerEvent . FairplayLicenseAcquired , function ( event ) {
119
- console . log ( "FairPlay 라이선스가 갱신되었습니다:" , event ) ;
120
- } ) ;
90
+ ) ;
121
91
} )
0 commit comments