none
[UWP][JS]how to use archive.org iframe in uwp

    Question

  • Dear all,

    i want to use the following iframe from https://archive.org/help/video.php?identifier=peril_of_doc_ock

    <iframe src="https://archive.org/embed/peril_of_doc_ock" width="640" height="480" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe>

    i have created the web view page in uwp.

    i am very new to UWP, can somebody guide me how i could implement this?

    thank you.
    Friday, November 2, 2018 11:31 AM

Answers

  • Hi,

    Well, I made a test and I could see the video. I created a simple html file and put the iframe tag in the html file. Then I created a webview to load the Html file and the iframe could show the content correclty.

    Here is my code that you could refer:

     <Grid>
            <WebView x:Name="MyWebView"/>
        </Grid>


     public MainPage()
            {
                this.InitializeComponent();
    
                MyWebView.Navigate(new Uri("ms-appx-web:///index.html"));
            }

    And this is my html page:

    <html>
    <head>
        <meta charset="utf-8" />
        <title>TestIframe</title>
        <link href="css/default.css" rel="stylesheet" />
    </head>
    <body>
        <div>Content goes here!</div>
        <div>GetSomeHelp</div>
        <iframe src="https://archive.org/embed/peril_of_doc_ock" width="640" height="480" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe>
    </body>
    </html>


    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Mahjoor Wednesday, November 7, 2018 3:01 PM
    Monday, November 5, 2018 5:57 AM
    Moderator

All replies

  • Hi,

    Well, I made a test and I could see the video. I created a simple html file and put the iframe tag in the html file. Then I created a webview to load the Html file and the iframe could show the content correclty.

    Here is my code that you could refer:

     <Grid>
            <WebView x:Name="MyWebView"/>
        </Grid>


     public MainPage()
            {
                this.InitializeComponent();
    
                MyWebView.Navigate(new Uri("ms-appx-web:///index.html"));
            }

    And this is my html page:

    <html>
    <head>
        <meta charset="utf-8" />
        <title>TestIframe</title>
        <link href="css/default.css" rel="stylesheet" />
    </head>
    <body>
        <div>Content goes here!</div>
        <div>GetSomeHelp</div>
        <iframe src="https://archive.org/embed/peril_of_doc_ock" width="640" height="480" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe>
    </body>
    </html>


    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Mahjoor Wednesday, November 7, 2018 3:01 PM
    Monday, November 5, 2018 5:57 AM
    Moderator
  • thank you very much.
    Wednesday, November 7, 2018 3:01 PM