Skip to main content

Plugins

Plugins

By including the following script files with default embed code, you can easily test the feature of the Songle Widget API. For instance, the following scripts enable showing photos and shapes synchronously with playing songs as well as visualizing music structures.

Visualize music structures​

<script src="https://ongacrest.github.io/songle-widget-api-examples/extras/sw-extra-stats.js"></script>

Show the demo

Show shapes​

<script src="https://ongacrest.github.io/songle-widget-api-examples/extras/sw-extra-visualizer.js"></script>

Show the demo

Embedded options​

Option nameExplanationDefault valueRequired?
data-apiSpecifies unique string when using the API.""No
data-urlSpecifies the URL of the original song or video.
(e.g. www.youtube.com/watch?v=PqJNc9KVIZE)
""Yes
data-api-create-callback-nameSpecifies the name of the callback method, called when the Songle Widget DOM element is created."onSongleWidgetCreate"No
data-api-error-callback-nameSpecifies the name of the callback method, called when the initialization of the API fails."onSongleWidgetError"No
data-api-ready-callback-nameSpecifies the name of the callback method, called when the initialization of the API succeeds."onSongleWidgetReady"No
data-api-beat-auto-reloadEnables auto-update of the beat (pulse) information when 1 is specified."0"No
data-api-chord-auto-reloadEnables auto-update of the chord information when 1 is specified."0"No
data-api-melody-auto-reloadEnables auto-update of the melody information when 1 is specified."0"No
data-api-chorus-auto-reloadEnables auto-update of the chorus part information when 1 is specified."0"No
data-api-beat-disabledSkips loading the beat (pulse) information when 1 is specified."0"No
data-api-chord-disabledSkips loading the chord information when 1 is specified."0"No
data-api-melody-disabledSkips loading the melody information when 1 is specified."0"No
data-api-chorus-disabledSkips loading the chorus part information when 1 is specified."0"No
data-api-beat-revisionForces the widget to load the specified revision of the beat (pulse) information.
If 0 is specified, load the newest revision.
"0"No
data-api-chord-revisionForces the widget to load the specified revision of the chord information.
If 0 is specified, load the newest revision.
"0"No
data-api-melody-revisionForces the widget to load the specified revision of the melody information.
If 0 is specified, load the newest revision.
"0"No
data-api-chorus-revisionForces the widget to load the specified revision of the chorus part information.
If 0 is specified, load the newest revision.
"0"No
data-song-auto-playEnables auto-play (automatically starts playing the music or video) if 1 is specified. This option is only available for a YouTube video and MP3 file."0"No
data-song-auto-loopEnables auto-loop (automatically restarts playing the music or video when reaching its end) if 1 is specified. This option is only available for a YouTube video and MP3 file."0"No
data-song-start-atSpecifies the starting position of playing the music or video. [seconds]
If chorus is specified, playing starts at the first chorus part highlighted in orange.
If repeat is specified, playing starts at the first repeat segment highlighted in blue.
"0"No
data-song-volumeSpecifies the initial volume. [0 - 100]"auto"No
data-songle-widget-ctrlShows the playback control if 1 is specified."1"No
data-songle-widget-ctrl-enter-colorSpecifies the color of the playback control when the mouse is hoverred."#e17"No
data-songle-widget-ctrl-leave-colorSpecifies the color of the playback control when the mouse is left."#000"No
data-songle-widget-ctrl-link-colorSpecifies the color of the information text."#e17"No
data-songle-widget-size-wSpecifies the width of the Songle Widget. [px]
If auto is specified, the widget automatically fits to the parent element.
"275"No
data-songle-widget-size-hSpecifies the height of the Songle Widget. [px]
If auto is specified, the widget automatically fits to the parent element.
"100"No
data-video-player-size-wSpecifies the width of the video player. [px]
If auto is specified, the player automatically fits to the parent element.
"275"No
data-video-player-size-hSpecifies the height of the video player. [px]
If auto is specified, the player automatically fits to the parent element.
"155"No
data-nn-transparentIf 1 is specified, enables wmode. This option is only available for Niconico videos."0"No
data-yt-ctrlIf 1 is specified, shows playback controls of the video player. This option is only available for YouTube videos."0"No
data-yt-infoIf 1 is specified, shows detailed information of the video player. This option is only available for YouTube videos."0"No
data-yt-qualitySpecifies the quality of the video. This option is only available for YouTube videos."small"No