RadWindow to allow camera

4 posts, 0 answers
  1. Deepam
    Deepam avatar
    2 posts
    Member since:
    Jul 2019

    Posted 18 Jul Link to this post

    Hi,

    I am using Radwindow in my asp.net application as below

     

        <telerik:RadWindow VisibleOnPageLoad="false" Behaviors="Close,Move,Maximize,Resize" VisibleStatusbar="false" VisibleTitlebar="true" Modal="true"     ShowContentDuringLoad="false" ID="rwEdit" runat="server" KeepInScreenBounds="true" InitialBehaviors="Maximize" Style="z-index: 9000"     AutoSizeBehaviors="Width, Height" AutoSize="true">
         </telerik:RadWindow>

     

    In my javascript I set the url and display the window

     

        var rWindow = $find(rwEdit);
        if (rWindow) {
            //rWindow.allow = 'camera';   // Tried to set the camera
            rWindow.setSize(1000, 800);
            rWindow.set_title('Open Form');
            rWindow.set_modal(true);
            rWindow.setActive(true);
            rWindow.setUrl('http://localhost:8080/execute/1563377889038?pid=1');
            rWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Resize + Telerik.Web.UI.WindowBehaviors.Maximize);
            rWindow.show();
            rWindow.add_close(OnClientClose);

    }

     

    On executing the Radwindow creates a iframe (as seen in dev tools) with the same id as RadWindow. I want to use the camera(webcam) within the iframe. I have tried giving the attribute 'allow' in the javascript but it does not work. 

     

    Could I please have some help with this? How can I enable the feature policy of 'camera'?

     

    Thanks

    Deepam

     

  2. Rumen
    Admin
    Rumen avatar
    14010 posts

    Posted 22 Jul Link to this post

    Hello,

    Are you able to run the camera in an iframe on the page outside of RadWindow iframe?

    Have you also tried to use ContentTemplate in RadWindow to load the camera app?

    Regards,
    Rumen
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Deepam
    Deepam avatar
    2 posts
    Member since:
    Jul 2019

    Posted 23 Jul in reply to Rumen Link to this post

    Hi,

    I realised that chrome has security issues and would not allow the camera to work on http site. It needs to be https and all works fine now. Thanks

     

  4. Rumen
    Admin
    Rumen avatar
    14010 posts

    Posted 23 Jul Link to this post

    I am glad that you managed to find the reason for the problem and would like to thank you for sharing the reason for it!


    Regards,
    Rumen
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top