Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

How To Dynamically Set VideoPlayer Path

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How To Dynamically Set VideoPlayer Path

    I have a simple UX with 2 Panel Cards:

    Panel card 1 has a static dropdown list with the directory path of a corresponding mp4 video file
    When the video is selected from the dropdown list, I populate a control called VideoPath with the directory path and go to panel card 2 where the videoplayer resides

    Problem is I don't seem to be able to use a placeholder {VideoPath} as the location for the video file, the player doesn't recognize this.

    Videos.jpg

    Does the VideoPlayer not work with placeholders or is the VideoPath control data not getting passed into the second panel card?
    How can I dynamically set the video path?
    Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

    #2
    Re: How To Dynamically Set VideoPlayer Path

    The VideoPlayer you're working with is not a data bound control. It is just a video tag, however, so you can get a pointer to that control and set it's source. From a DropDownBox Control... onChange event...

    Code:
    var vp = {dialog.Object}.getPointer('VideoPlayer');
    vp.src = this.value;

    Comment


      #3
      Re: How To Dynamically Set VideoPlayer Path

      Thanks David!

      I've now changed the dropbox to a list so I can eventually have the data bound to a SQL table. So now it uses the list click event to 'read an html5 url from a list' using the Video Player Control Actions.

      VideoPlayerActions.jpg

      Works great in Live Preview and Internet Explorer but does not work in Chrome or Firefox. This is what Chrome & Firefox show.

      Not Supported.jpg

      I am assuming this might be due to the codec but as I understand, html5 video is compatible with all these browsers (https://en.wikipedia.org/wiki/HTML5_video)
      for H.264 encoded mp4's, which is what I am using as source video files.

      Has anyone run into this issue? I wonder if it has something to do with running inside a TabbedUI? Maybe I need to open the video inside a standalone a5w page ..
      Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

      Comment


        #4
        Re: How To Dynamically Set VideoPlayer Path

        I am getting totally frustrated tying to work with the Alpha video player!!!

        Would someone be willing to try the attached component and see if it will play video at all?
        It is a basic component with a static list that points to a video located in C:\Temp (the test video is also attached). Just unzip the mp4 video into C:\Temp

        I managed to get this working at home (A5WS) under working preview and IE browser only, which would be acceptable.
        But I try it at work (IIS Server) and it doesn't work at all!!! Wasted 2 days on this and ready to give up.

        Thanks to anyone willing to take a look.
        Attached Files
        Last edited by iRadiate; 11-20-2017, 11:26 AM. Reason: grammar
        Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

        Comment


          #5
          Re: How To Dynamically Set VideoPlayer Path

          I haven't tried under IIS, but running locally, you can NOT access a local resource. "Not allowed to access a local resource" is the console message. For a test, put the video into a relative folder.

          Is there a specific reason you want to use that particular VideoPlayer control? It carries a lot of console errors.
          Last edited by Davidk; 11-20-2017, 05:45 PM.

          Comment


            #6
            Re: How To Dynamically Set VideoPlayer Path

            Originally posted by Davidk View Post
            I haven't tried under IIS, but running locally, you can access a local resource. "Not allowed to access a local resource" is the console message. For a test, put the video into a relative folder.
            Thanks David. In my testing I have tried local and network folders without success under IIS at work. At home, I can only test A5WS and it works there for IE & Working Preview. That's the best I can do for testing and deployment.

            Let me give you a bit of context here.

            I want to make available some application tutorial videos (How to unlock user accounts, How to reset user passwords, etc) for my users with administrator permission .
            These videos need to reside on a local network folder, not in a web resource such as YouTube or Viddler, etc. They will be accessed via a UX in a TabbedUI.

            Originally posted by Davidk View Post
            Is there a specific reason you want to use that particular VideoPlayer control? It carries a lot of console errors.
            Not at all. This is the very first time I have worked with video or the video player components within Alpha. I have found the documentation around video components to be very minimal at best so I am basically fumbling my way through this not really knowing what I'm doing .. essentially trial and error (and a video I found by Bob Moore).

            I started with a simple dropdown list with a static URL link just to see if I could make it work. Ultimately, the end goal would be to make the video links themselves data-bound in a SQL table so they could be managed from within the application itself (via file upload action javascript). But I'm not that far along yet. I'm currently stuck at getting the above UX with static list data to work.

            If there is a better way to achieve what I want to accomplish, then I have no problem doing things differently.
            Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

            Comment


              #7
              Re: How To Dynamically Set VideoPlayer Path

              Sorry... I meant to write that you can NOT access a local resource.

              There's the Data Controls Video - Data Bound control. This one is referenced by a data bound field.

              Then there is the Data Controls - More - VideoPlayer control. This is pretty much just a straight forward <video> tag... but with lots of nice events. I like this one the best.

              Then there is the Other Controls - VideoPlayer. This lets you select HTML5, Vimeo, YouTube, etc. If HTML5, then it's a <video> tag. Otherwise, I believe it's an <iframe> with a URL for a source.
              This one is a bit of a pain for HTML5, because it wants all kinds of other stuff... WebM URL, OGG URL, Poster Images... and if you don't supply that stuff you get console errors.

              So, if you want to work with a <video> tag, then use the Data Controls More VideoPlayer. Your List supplies the relative path, the <video> tag src gets set (in code off the List) and it's nice and easy.

              But there's the question of where to put the videos for IIS.

              Comment


                #8
                Re: How To Dynamically Set VideoPlayer Path

                I just want to throw this into the mix - why not use a YouTube account? It would just be a matter of storing URLs at that point with a ton of options, storage and bandwidth that you would otherwise have to deal with in some way or another. It's a great service for a developer, not to mention the automatic marketing bump in the search engines using the title of the upload.
                NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                Comment


                  #9
                  Re: How To Dynamically Set VideoPlayer Path

                  Originally posted by CharlesParker View Post
                  I just want to throw this into the mix - why not use a YouTube account? It would just be a matter of storing URLs at that point with a ton of options, storage and bandwidth that you would otherwise have to deal with in some way or another. It's a great service for a developer, not to mention the automatic marketing bump in the search engines using the title of the upload.
                  Our corporate policy won't allow it. In fact, the application does not access the internet at all.
                  Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                  Comment


                    #10
                    Re: How To Dynamically Set VideoPlayer Path

                    Originally posted by Davidk View Post
                    Then there is the Data Controls - More - VideoPlayer control. This is pretty much just a straight forward <video> tag... but with lots of nice events. I like this one the best.
                    So, if you want to work with a <video> tag, then use the Data Controls More VideoPlayer. Your List supplies the relative path, the <video> tag src gets set (in code off the List) and it's nice and easy.
                    I will take a look at this, thanks!

                    Originally posted by Davidk View Post
                    But there's the question of where to put the videos for IIS.
                    IIS handles data files stored on network folders with no problems so I can't see why the type would matter ... but then again, maybe is does, I don't know.
                    Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                    Comment


                      #11
                      Re: How To Dynamically Set VideoPlayer Path

                      Makes sense Stephen - looks like you will have your hands tied and loaded down too!
                      NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                      Comment


                        #12
                        Re: How To Dynamically Set VideoPlayer Path

                        Here's something you can follow as a clue. In your UX, you've got "mySVGIcons.svg" set in the "SVG Linked files" property. Where is the "MySVGIcon.svg" file located on your server?

                        Wherever that is, it would be the main folder where your application resides. Add a folder there named "myVideos" and your video paths should then be, for example, "myVideos\videoname.mp4".

                        You're trying to include a drive letter... maybe you can't do that. Also, maybe it has something to do with backward and forward slashes... \ and /. Maybe they need to be escaped. Not sure. I'll have to test it.

                        Further, IE and Edge allow access to drives... but Chrome and Firefox are a bit smarter and will not allow this. Working preview displayed an "Aborted" message over the video area... and Live Preview works. I believe Live Preview and Working Preview are, by default, IE... so Live Preview working makes sense.
                        Last edited by Davidk; 11-21-2017, 01:08 PM.

                        Comment


                          #13
                          Re: How To Dynamically Set VideoPlayer Path

                          Originally posted by Davidk View Post
                          Here's something you can follow as a clue. In your UX, you've got "mySVGIcons.svg" set in the "SVG Linked files" property. Where is the "MySVGIcon.svg" file located on your server?

                          Wherever that is, it would be the main folder where your application resides. Add a folder there named "myVideos" and your video paths should then be, for example, "myVideos\videoname.mp4".

                          You're trying to include a drive letter... maybe you can't do that. Also, maybe it has something to do with backward and forward slashes... \ and /. Maybe they need to be escaped. Not sure. I'll have to test it.

                          Further, IE and Edge allow access to drives... but Chrome and Firefox are a bit smarter and will not allow this. Working preview displayed an "Aborted" message over the video area... and Live Preview works. I believe Live Preview and Working Preview are, by default, IE... so Live Preview working makes sense.
                          Finally I have this working! By default IIS publishes to C:\inetpub\wwwroot which holds the web pages and content and where mySVGIcons.svg is published. I don't think it is good practice to host files here but for the sake of testing I tried using it to hold the .mp4 video files. I couldn't make it work but in hindsight it must have been the Data Controls - More - VideoPlayer control. I reverted back to my original Other Controls - VideoPlayer and paid closer attention to the browser as you suggested above.

                          It works with Internet Explorer and Microsoft Edge but does not work with Chrome or Firefox. It seems that this is because Microsoft pays the licensing fees to use the codec whereas Mozilla & Google don't. Simply looking at browser support for html5 <video> element and h.264 codec with an mp4 video container is ridiculously ambiguous and straight up confusing. There are websites that host h.264 mp4 video that can be accessed and played directly in Firefox and is also supposedly natively supported by Chrome. Yet, this is definitely not a given. To see just how convoluted all of this gets, this is a quote from the Mozilla site regarding media format support.

                          "MP4 H.264 (AAC or MP3)
                          The MP4 container format with the H.264 video codec and the AAC audio codec is natively supported by desktop/mobile Internet Explorer, Safari and Chrome, but Chromium and Opera do not support the format. IE and Chrome also support the MP3 audio codec in the MP4 container, but Safari does not. Firefox/Firefox for Android/Firefox OS supports the format in some cases, but only when a third-party decoder is available, and the device hardware can handle the profile used to encode the MP4."


                          The videos I have been using are H.264 codec with mp4 container and AAC audio. This 'should' therefore work in IE and Chrome. It does not work in Chrome for me.

                          My head hurts from trying to make logical sense of this mixed bag of conflicting information.
                          I have attached my latest component that works ... in Internet Explorer inside a TabbedUI hosted by an IIS server (it will work with WAS also).
                          It uses a list control with static data to select the video. You would just need to modify the path to your own videos should you wish to use it.
                          The video players URL is set programmatically by the List. The list events' onclick action reads the html5 video's URL and passes it to the video player. It looks like this:

                          ListEvent.jpg

                          When modifying the static list data, IIS Server does not like mapped drives and wants to see fully qualified names like this:

                          Code:
                          Title|Path
                          1. Video 1|\\ServerName\ShareName\FolderName\FileName1.mp4
                          2. Video 2|\\ServerName\ShareName\FolderName\FileName2.mp4
                          3. Video 3|\\ServerName\ShareName\FolderName\FileName3.mp4
                          For WAS, you can use mapped drives like this:

                          Code:
                          Title|Path
                          1. Video 1|D:\FolderName\FileName1.mp4
                          2. Video 2|D:\FolderName\FileName2.mp4
                          3. Video 3|D:\FolderName\FileName3.mp4
                          Maybe this info might save someone else some aggravation. Hope it helps someone.

                          And Thanks David!
                          Attached Files
                          Last edited by iRadiate; 11-22-2017, 08:59 PM. Reason: tidy up post
                          Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                          Comment


                            #14
                            Re: How To Dynamically Set VideoPlayer Path

                            Great post - thanks for the follow up!
                            NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                            Comment

                            Working...
                            X