forked from WorldObservationLog/AppleMusicDecrypt
-
Notifications
You must be signed in to change notification settings - Fork 1
/
m3u8_sv.js
21 lines (21 loc) · 818 Bytes
/
m3u8_sv.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
setTimeout(function () {
Java.performNow(function () {
Java.use("com.apple.android.music.common.MainContentActivity");
var SVPlaybackLeaseManagerProxy;
Java.choose("com.apple.android.music.playback.SVPlaybackLeaseManagerProxy", {
onMatch: function (x) {
SVPlaybackLeaseManagerProxy = x
},
onComplete: function (x) {}
});
var HLSParam = Java.array('java.lang.String', ["HLS"])
function getM3U8(adamID) {
var MediaAssetInfo = SVPlaybackLeaseManagerProxy.requestAsset(parseInt(adamID), HLSParam, false)
if (MediaAssetInfo === null) {
return -1
}
return MediaAssetInfo.getDownloadUrl()
}
rpc.exports = {"getm3u8": getM3U8}
})
}, 8000)