Implementing WebVideo duration and printing.
This commit is contained in:
parent
10717232c2
commit
74af2f9fc6
@ -34,6 +34,12 @@ WebVideo >> authorId: anObject [
|
||||
authorId := anObject
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
WebVideo >> defaultThumbnailLink [
|
||||
^ (self videoThumbnails
|
||||
detect: [ :thumbnail | (thumbnail at: 'quality') = 'high' ]) at: 'url'
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
WebVideo >> description [
|
||||
^ description
|
||||
@ -44,6 +50,12 @@ WebVideo >> description: anObject [
|
||||
description := anObject
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
WebVideo >> duration [
|
||||
^ self lengthSeconds asInteger asDuration asString
|
||||
"This is a new method"
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
WebVideo >> fromDictionary: aDictionary [
|
||||
^ self author: (aDictionary at: 'author');
|
||||
@ -80,7 +92,15 @@ WebVideo >> likeCount: anObject [
|
||||
WebVideo >> printOn: aStream [
|
||||
super printOn: aStream.
|
||||
aStream
|
||||
nextPutAll: '( ', self videoId, ' | ', self title, ' | ', self author, ' )'
|
||||
nextPutAll: '( ', self videoId, ' | ', self title, ' | ', self duration,' | ', self author, ' )'
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
WebVideo >> thumbnail [
|
||||
|
||||
^ SkiaImage
|
||||
fromForm: (Form
|
||||
fromBase64String: self defaultThumbnailLink asUrl retrieveContents base64Encoded)
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
|
Loading…
Reference in New Issue
Block a user