Jump to content

Search the Community

Showing results for tags 'caching'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • General Development
    • uniGUI Releases & Roadmaps
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
    • Third Party Components
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. Searching the web I found this code for implementing video caching:- ' <script>'+ ' // -- Create a MediaSource and attach it to the video'+ ' const videoTag = document.getElementById("MyVideoTag");'+ ' const myMediaSource = new MediaSource();'+ ' const url = URL.createObjectURL(myMediaSource);'+ ' videoTag.src = url;'+ ' // 1. add source buffers'+ ' const audioSourceBuffer = myMediaSource.addSourceBuffer(''audio/mp4; codecs="mp4a.40.2"'');'+ ' const videoSourceBuffer = myMediaSource.addSourceBuffer(''video/mp4; codecs="avc1.64001e"'');'+ ' // 2. download and add our audio/video to the SourceBuffers for the audio SourceBuffer'+ ' fetch("https://mydomain.com/audio.mp4").then (function(response)'+ ' {'+ ' // The data has to be a JavaScript ArrayBuffer'+ ' return response.arrayBuffer();'+ ' }'+ ' ).then (function(audioData) '+ ' {'+ ' audioSourceBuffer.appendBuffer(audioData);'+ ' }'+ ' );'+ ' // the same for the video SourceBuffer'+ ' fetch("https://mydomain.com/video.mp4").then (function(response)'+ ' {'+ ' // The data has to be a JavaScript ArrayBuffer'+ ' return response.arrayBuffer();'+ ' }'+ ' ).then (function(videoData)'+ ' {'+ ' videoSourceBuffer.appendBuffer(videoData);'+ ' }'+ ' );'+ ' </script>'+ I have added this script to the HtmlFrame that contains the video tag with the id="MyVideoTag" and ask if any other code is required to activate this javascript caching ? Thanks in advance
×
×
  • Create New...