Skip to content

VLCMediaThumbnailer thumbnail dimensions

In the below test code,

thumbnailer.thumbnailWidth
thumbnailer.thumbnailHeight

are never updated and are evaluated as 0.0 even after fetchThumbnail() is called.

Note that this happens even though thumbnailer.thumbnail is not nil.

let delegate = MockThumbnailerDelegate()
let fetched = expectation(description: "delegate::didFinishThumbnail called")
delegate.finishedExpectation = fetched

let thumbnailer = try XCTAssertNotNilAndUnwrap(VLCMediaThumbnailer(media: video.media, andDelegate: delegate))
thumbnailer.fetchThumbnail()

wait(for: [fetched], timeout: STANDARD_TIME_OUT)

XCTAssertNotNil(thumbnailer.thumbnail)

// ⚠️ XCTAssertTrue failed
XCTAssert(thumbnailer.thumbnailWidth > 0)
// ⚠️ XCTAssertTrue failed
XCTAssert(thumbnailer.thumbnailHeight > 0)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information