An event that triggers when a video file has completed transcoding.
The onVideoTranscoded()
event handler runs when an uploaded video file
has finished transcoding. Video files that have been imported aren't immediately available
until the transcoding has completed.
It is fired after the onFileUploaded
event, and after the transcoding has completed. The FileEvent
object contains information about the uploaded video and the upload context.
Note: Backend events don't work when previewing your site.
function onVideoTranscoded(event: FileEvent): void;
The uploaded file information.
// Place this code in the events.js file
// of your site's Backend section.
export function wixMediaManager_onVideoTranscoded(event) {
let videoFileInfo = event.fileInfo;
let fileUrl = event.fileInfo.fileUrl;
let height = event.fileInfo.height;
}
/* Full event object:
* {
* "fileInfo": {
* "mediaType": "video",
* "sourceUrl": "https://somedomain.com/img/original-name.mp4",
* "height": 480,
* "mimeType":"video/mp4",
* "hash":"c439e7b7a52f7d7d7263bc0c97dd1ab8",
* "fileUrl":"wix:video://v1/22d494_3d4b9f1c39674519bf636b9bef499659/fileName.mp4#posterUri=22d494_3d4b9f1c39674519bf636b9bef499659f002.jpg&posterWidth=480&posterHeight=480",
* "originalFileName":"fileName.mp4",
* "opStatus": "READY",
* "originalFileName": "original-name.mp4",
* "sizeInBytes":74424,
* "isPrivate":false,
* "width":480,
* "iconUrl":"wix:image://v1/22d494_3d4b9f1c39674519bf636b9bef499659f002.jpg/fileName.mp4#originWidth=480&originHeight=480"
* "parentFolderId":"09057cf95974494c83c8e0b93fd93909"}]"
* },
* "context": {
* "someKey1": "someValue1",
* "someKey2": "someValue2"
* }
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.