How do I play a youtube video in MATLAB App designer using HTML?
Mostra commenti meno recenti
I am trying to embed and play a Youtube video using the HTML Component in the App Designer but am unable to do so. Is this even possible with the current 2020a release?
8 Commenti
Geoff Hayes
il 11 Giu 2020
Aditya - what is the code that you are using to embed and play the video? Does the HTML code include something similar to
<iframe width="420" height="315"
src="https://www.youtube.com/linkToSomeVideo/videoId">
</iframe>
?
AT
il 11 Giu 2020
Mohammad Sami
il 12 Giu 2020
I tested on R2020a using iframe embde code with uihtml. but it just shows blank screen.
AT
il 12 Giu 2020
Mohammad Sami
il 12 Giu 2020
I checked the documentations, following are currently listead as the limitations inluding embed code.
Limitations
- You cannot link to URL web resources or embed applications from external web pages using the uihtml function.
- HTML files that you specify for the HTMLSource property cannot access third-party JavaScript libraries by way of a Content Delivery Network (CDN). Save libraries in a location that your local file system can access.
- Common web file types, like JavaScript and CSS, can be referenced from the HTML file you specify for the HTMLSource property, but other web file types might not be supported.
- Content cannot overflow the bounds of the HTML UI component. If you are creating dynamic content, like pop-up widgets, make the size of your HTML UI component large enough to display the widget when the pop-up is in its opened state.
- On MATLAB desktop, certain HTML features such as web plugins and access to webcams or microphones are not supported.
- You cannot set the HTMLSource property to an HTML file that has query parameters appended to its file name. As a workaround, set these parameters in htmlComponent.Data.
- Hyperlinks with matlab: operations are not supported.
mohammad Dezfoulian
il 8 Giu 2021
Mohammad, From where have you got this limitation note?
Mohammad Sami
il 15 Giu 2021
The limitations are specified in the documentation.
https://www.mathworks.com/help/matlab/ref/uihtml.html
IFM
il 14 Apr 2023
Did you ever find a work around? I am looking to do the same thing.
Risposte (1)
Rushikesh
il 11 Ott 2024
0 voti
As of now, MATLAB R2020a does not support embedding of external web page such as youtube videos in html component. As mentioned in MATLAB Documentation.
One possible workaround is to download the video locally that you want to play as embedded and place it in same or sub folder of your HTML file. Then reference that video from you HTML file.
Categorie
Scopri di più su Package and Share Apps in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!