<div dir="ltr"><div><div><div><div><div><div>Based on discussions / suggestions earlier, I'm trying to do the following:<br><br></div>1. create sources with change listeners<br></div>2. pass them, along with the functions that can update them, to the javascript ffi<br>

</div>3. trigger those updates in javascript code, which should in turn trigger the change handlers written with ur/web.<br><br></div><div>(the reasons for this is that the little app I've been experimenting with does a bit with html5 video... which is browser dependent, depends on very new javascript apis, etc...)<br>

</div><div><br></div>As far as I understand this, in principle this should be possible - execF in javascript land should be able to call the update function, and records, sources, and functions are all representable in javascript, so I should be able to pass these special sources back and forth. My problem is just writing the type signature for the FFI signature file - as mentioned in the other thread, it seems like sourceL.ur from the meta repository will work for what I want, and so the signature I want to write is:<br>

<br>val init : id -> (* id for player container *)<br>           SourceL.t float -> (* offset source *)<br>           (SourceL.t float -> float -> transaction unit) -> (* set function *)<br>           url -> (* video url *)<br>

           url -> (* audio url *)<br>           transaction unit<br><br></div>Which fails, because the signature file doesn't know what I mean by SourceL. How can I get that in scope, or is this just not possible (because I've overestimated what I can get into javascript)? (I've tried some monkeying with `library`, creating an urp file, etc - with no luck).<br>

<br></div>Thanks!<br>Daniel<br></div>