Forum Discussion

HeatherBryant2's avatar
HeatherBryant2
Qrew Assistant Captain
7 years ago

View Video on Mobile

I've uploaded a video as a file attachment and put the file's URL as a button on the dashboard.

The video downloads fine from the desktop site, but won't in Mobile view.

Is this feature not available for mobile? 

Thanks!
  • Hi Heather,

    I've tried to actually embed a playable video on dashboards, using the web page widget and some simple HTML 5 markup. It works great on the desktop but for mobile you will be presented with a URL like my first screenshot below. However, upon clicking this link from mobile, you will be directed to a page where you can play/download the video. Would that work? HTML code below as well.

    1) put the below code in a code page in QB--replacing my URL in quotes (src="....") with your video's URL. Call it something like "videoembed.html"

    2) display videoembed.html page in a website widget in a dashboard page (copy the URL from the page preview and paste that into the web widget)

    Let me know if you have any questions!

    Charlie

    Code page snippet:

    <!DOCTYPE html> 
    <html> 
    <body> 

    <video width="400" controls>
      <source src="https://mcftech.quickbase.com/up/....."; type="video/mp4">
      Your browser does not support HTML5 video.
    </video>
    </body> 
    </html>

    ----------------------------------------------------------

    Mobile 1: 


    Mobile 2 (you can play directly in your mobile browser + download to your device via the button in the bottom right corner): 

    • AdamKeever1's avatar
      AdamKeever1
      Qrew Commander
      If you use :

      <video width="100%" controls>

      instead, the video will automatically size to the container so it will fill the screen whether it is desktop or mobile.
  • Hey Charlie, this is exactly what I'm looking for... My issue is that I'm having trouble with the notation for the source link... any insight would be greatly appreciated. I keep getting invalid link.
    • AdamKeever1's avatar
      AdamKeever1
      Qrew Commander
      What do you mean specifically by "having trouble"? Would help to post your code.
    • RyanStanford1's avatar
      RyanStanford1
      Qrew Captain
      My source link keeps stating invalid, or doesn't load when used as the source of a video html tag...

      The link I've been trying to work is something like:

      https://<realm>.quickbase.com/up/<dbid>/a/r/<record ID>/e<FieldID of Video File Attachment>/v0

      but when I try to access this directly, I get a page stating invalid link
    • RyanStanford1's avatar
      RyanStanford1
      Qrew Captain
      I fixed the issue of invalid link, I had a / in between r and the record ID...

      I'm still having the issue that this URL isn't playing when used as a source for a video tag.
  • You can use the iframe technique from the magic buttons app.

    create a formula rich text field, [iframe], and give it the following code:
    "<video src = " & URLRoot() &"up/"& Dbid() &"/a/r"& [Record ID#]&"/e9/v0\" width=\"500\" controls>\n</video>"

    rename the [attachment] field to whatever yours is named.

    create a report link field, [link], and set the field relationship as follows:


    In my example the app name is QB Developer Resources and the table name is Tests; set the relationship to match your app and table name.

    Next add the link field to your form and it will display the video and the user can play the video on the form.




    • AdamKeever1's avatar
      AdamKeever1
      Qrew Commander
      This function also works for your table views (here both videos were playing simultaneously):
    • AdamKeever1's avatar
      AdamKeever1
      Qrew Commander
      Need to make note that in the iframe code:
      "<video src = " & URLRoot() &"up/"& Dbid() &"/a/r"& [Record ID#]&"/e9/v0\" width=\"500\" controls>\n</video>"

      substitute the 9 in 'e9' for the field ID# of your attachment field.

      • JoyreBohanon1's avatar
        JoyreBohanon1
        Qrew Member
        Hi! When I use this code in the formula rich text formula field it gives a syntax error.

        ------------------------------
        Joyre Bohanon
        ------------------------------