Vuforia Studio Tutorials and FAQs > Intermediate > Use JavaScript Link to Remote Media
Use JavaScript Link to Remote Media
You can link to remote media resources at runtime using JavaScript. This can be done for the Audio and Video widgets. You may want to do this for some video and audio content stored on other servers that may be difficult to keep within a project.
You can link to a remote media resource at design time by providing the Resource value in the Details pane. Using bindings for remote resources is not supported at this time.
Below is an example of how you might use JavaScript and bindings to set the remote media for a video:
1. Drag and drop a Video widget onto the canvas.
2. Enter the following JavaScript in the Home.js editor:
$scope.assignTrustedUrl = function() {
$scope.view.wdg['video-1'].videosrc = '';
3. Drag and drop a Button widget onto the canvas, and name the button Load Video.
4. Click JS next to the Click event on in the Details pane, and enter the following in the expression box:
5. Now, when you view the Experience and click the “Load Video” button, the video referenced in the JavaScript is loaded in the Video widget, and you can then view the video.