Newer
Older
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
const PLATFORM = "bilibili";
// global (to the file) variable to later access the configuration details of the plugin
// initialized when enabling the plugin
let config;
// Source Methods
const source_temp = {
enable: function (conf, settings, savedState) {
config = conf;
// log(config)
log(settings);
log(savedState);
},
disable: function () {
// console.log("disabling")
},
saveState: function () { return undefined; },
isChannelUrl: function (url) {
return false;
},
getChannel: function (url) {
return new PlatformChannel({
id: new PlatformID("Vimeo", "an id", config.id),
name: "a string",
thumbnail: "a string",
banner: "a string",
subscribers: 69,
description: "a string",
url: "a string",
});
},
isContentDetailsUrl: function (url) {
return false;
},
getContentDetails: function (url) {
const platform_video_ID = new PlatformID(PLATFORM, "video_ID", config.id);
const platform_creator_ID = new PlatformID(PLATFORM, "owner_ID", config.id);
const details = new PlatformVideoDetails({
id: platform_video_ID,
name: "a string",
//thumbnails: new Thumbnails(video_info.pictures.s,
author: new PlatformAuthorLink(platform_creator_ID, "a string", "a string", "a string", 69),
duration: 69,
viewCount: 69,
url: "a string",
isLive: false, // hardcoded for now
description: "a string",
video: new VideoSourceDescriptor([new DashSource({
url: "a string"
})]),
rating: new RatingLikes(69),
shareUrl: "a string",
uploadDate: 69
});
return details;
}
};
// assign the methods to the source object
for (const key of Object.keys(source_temp)) {
// @ts-expect-error TODO make it so that the ts-expect-error is no longer required
source[key] = source_temp[key];
}
function get_jwt() {
const authentication_url = "https://vimeo.com/_next/viewer";
const authentication_response_json = http.GET(authentication_url, new Map(), false).body;
const authentication_response = JSON.parse(authentication_response_json);
return authentication_response.jwt;
}
// export statements removed during build step
//# sourceMappingURL=script.js.map