mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-03-06 09:59:20 +00:00
Add video support (experimental!)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const constants = require("../constants")
|
||||
const {proxyImage, proxyExtendedOwner} = require("../utils/proxyurl")
|
||||
const {proxyImage, proxyVideo} = require("../utils/proxyurl")
|
||||
|
||||
class TimelineBaseMethods {
|
||||
constructor() {
|
||||
@@ -21,10 +21,18 @@ class TimelineBaseMethods {
|
||||
}
|
||||
}
|
||||
|
||||
isVideo() {
|
||||
return this.data.__typename === "GraphVideo"
|
||||
}
|
||||
|
||||
getDisplayUrlP() {
|
||||
return proxyImage(this.data.display_url)
|
||||
}
|
||||
|
||||
getVideoUrlP() {
|
||||
return proxyVideo(this.data.video_url)
|
||||
}
|
||||
|
||||
getAlt() {
|
||||
return this.data.accessibility_caption || "No image description available."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user