Jump to content

AndrewPVI

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About AndrewPVI

  • Rank
    Newbie
  1. Hello, I'm trying to use a simple Javascript to call a function of the local IP address of a host for a video player that auto-updates its IP address whenever the user modifies the IP of the Host. I've been using the Built-in HTML 5 player to play an Apple HLS video that streams from the host and it works but I want to dynamically update the video src using the javascript. I hope this makes sense. The code has ive been trying to piece together looks like this: function myFunction() { var hostip = location.host; document.getElementById("videohls").innerHTML = hostip ; this gets the host IP: 192.168.0.1 example. I need to take this IP and combine it with http:// + hostip + /1.m3u8 That output needs to be the HTML5 players src How can I make this possible? I feel like its really simple but I'm not a javascript expert at all.
×
×
  • Create New...