Hi all. Hope everyone is well.
Using the following init script, Im able to call the “LoadMedia” function just fine from a button click event on the Window.
My goal is to be able to call the “LoadMedia” function for the widget after adding it to a DataRepeater, but I’m unable to do the same using any of the events associated with DataRepeater.
I get an error saying “Unknown Function: LoadMedia”
Package name = “WaveSurfer.js”
Source = “https://unpkg.com/wavesurfer.js”
.fctbNone{ color:#000000; } .fctbStyle0{ color:#2e75b6; } .fctbStyle1{ color:#a31515; } .fctbStyle2{ color:#008000;font-style:oblique; } this.init = function(options) { this.container.id = "waveform"; // your initialization code. var wavesurfer = WaveSurfer.create({ container: '#waveform', waveColor: 'blue', progressColor: 'purple' }); this.LoadMedia = function(value){ wavesurfer.load(value); }; }
Any suggestions would be appreciated.
Thanks
Hi Lennox,
ItemCloned is fired when a new item is created but the new item is NOT the item on the screen. A data repeater with 1000 records and 3 visible items will fire ItemCloned 3 times, not 1000.
//js initialization
this.init = function(options) {
// your initialization code.
this.widget = WaveSurfer.create({
container: '#'+this.getId()+"_container",
waveColor: 'blue',
progressColor: 'purple'
});
'VB Event
Private Sub DataRepeater1_ItemUpdate(sender As Object, e As DataRepeaterItemEventArgs) Handles DataRepeater1.ItemUpdate
Dim Player As Widget = e.DataRepeaterItem.Controls("Widget1")
Player.Instance.load("http://ia902606.us.archive.org/35/items/shortpoetry_047_librivox/song_cjrg_teasdale_64kb.mp3")
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Widget2.Instance.load("http://ia902606.us.archive.org/35/items/shortpoetry_047_librivox/song_cjrg_teasdale_64kb.mp3")
End Sub
Happy Coding,
I attached one sample
Kevin (ITG)
Please find attached.
One button simply loads the widget and call the “LoadMedia” function by itself.
The other populates the Repeater and tries to call the function using the DataRepeater1_ItemCloned() event
I had to remove the “Wisej.Framework.dll” to keep the size of the zip file down.
Hi Lennox,
can you please post a complete sample that includes the Data Repeater and where you want to call the widget code?
Thanks in advance.
Best regards
Frank
Please login first to submit.