You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.
PlugLynn edited this page Apr 18, 2015
·
2 revisions
The Preview Dialog is a simple dialog with a YouTube or SoundCloud video embedded.
Code
varEvents=plugModules.require('plug/core/Events')varPreviewEvent=plugModules.require('plug/events/PreviewEvent')functionshowPreview(media){// The PreviewEvent expects a Media model, but any Backbone Model instance will work,// and creating a Model instance is easier than creating a Media instance.media=newBackbone.Model(media)Events.dispatch(newPreviewEvent(PreviewEvent.PREVIEW,media))}
Usage
showPreview({format: 1,// 1 for YouTube, 2 for SoundCloudcid: '',// YouTube or SoundCloud video ID, e.g. "e2rexvDHPZs"author: 'Artist Name',title: 'Song Name'})