Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

reload Mp4 on site return??

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

reload Mp4 on site return??

Post by ace2 »

My website has a mp4 which updates every hour, but for some reason, firefox decides to playback the cached copy and not the site copy, even crtl f5 does solve this.
I don't want to disable cache on page as i've heard it can cause headaches.

so what are my options??

http://www.users.on.net/~ace2/minilapse.htm

Code: Select all

<p align="center"><video src="lapse1.mp4" width="100%" controls autoplay >HTML5 Video is required for this example</video> </p>
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
User avatar
SpaceWalker
Posts: 67
Joined: Sun 04 Mar 2012 2:54 am
Weather Station: Davis Vantage
Operating System: Windows XP
Location: Eastern-Canada
Contact:

Re: reload Mp4 on site return??

Post by SpaceWalker »

How about adding a time parameter to the file name, such as (if PHP is available on your web hosting server):

Code: Select all

<p align="center"><video src="lapse1.mp4?<?php echo time(); ?>" width="100%" controls autoplay >HTML5 Video is required for this example</video> </p>
That will create a file name such as 'lapse1.mp4?1396869807' - the number will increment every seconds.
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Re: reload Mp4 on site return??

Post by ace2 »

SpaceWalker wrote:How about adding a time parameter to the file name, such as (if PHP is available on your web hosting server):

Code: Select all

<p align="center"><video src="lapse1.mp4?<?php echo time(); ?>" width="100%" controls autoplay >HTML5 Video is required for this example</video> </p>
That will create a file name such as 'lapse1.mp4?1396869807' - the number will increment every seconds.
Bloody internode don't allow php, bugga.....
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: reload Mp4 on site return??

Post by sfws »

deleted as of no help
Last edited by sfws on Mon 03 Aug 2015 2:19 pm, edited 1 time in total.
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Re: reload Mp4 on site return??

Post by ace2 »

So adding that simple script into the problem page will solve this issue???

(Unable to test until tomorrow)
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: reload Mp4 on site return??

Post by sfws »

deleted as of no help
Last edited by sfws on Mon 03 Aug 2015 2:18 pm, edited 1 time in total.
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Re: reload Mp4 on site return??

Post by ace2 »

added

Code: Select all

<script type="text/javascript">
function changeImage(im) {
	document.video.src="'lapse1.mp4?' + new Date().getTime()";
}
</script>
above the

Code: Select all

</head>

<body>
<div id="content">
still no luck..
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: reload Mp4 on site return??

Post by sfws »

(deleted as of no help)
Last edited by sfws on Mon 03 Aug 2015 2:17 pm, edited 1 time in total.
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Re: reload Mp4 on site return??

Post by ace2 »

sfws wrote:
Try having just the middle line within the script tags, and place the script just before
Ends with a no play or load video



The browser only knows that the page (document in javascript speak) has a

Code: Select all

<video>
element (i.e. .video in javascript speak) after it has processed constructing the page. I think that is better than adding a call to the function at the end, but declaring the function at the start.
<video> and </video> on either side of video call already

Code: Select all

<p align="center"><video src="lapse1.mp4" width="100%" controls autoplay >HTML5 Video is required for this example</video> </p>
You think they would make this easy!
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: reload Mp4 on site return??

Post by mcrossley »

Try...

Code: Select all

	<video id="vid1" width="100%" controls="" autoplay="">HTML5 Video is required for this example</video>
	<script type="text/javascript">
	document.getElementById('vid1').src='lapse1.mp4?' + new Date().getTime();
	</script>
Edit: pasted the wrong element the first time, not the <video>!
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: reload Mp4 on site return??

Post by mcrossley »

A better solution may be...

Code: Select all

   <!-- <video width="100%" controls="" autoplay="">HTML5 Video is required for this example</video> -->
   <script type="text/javascript">
     document.write('<video width="100%" controls="" autoplay="" src="lapse1.mp4?' + new Date().getTime() + '">HTML5 Video is required for this example</video>');
   </script>
   <noscript>
     <video width="100%" controls="" autoplay="" src="lapse1.mp4">HTML5 Video is required for this example</video>
   </noscript>
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Re: reload Mp4 on site return??

Post by ace2 »

Thank you soooooooo much yet again.

The first one worked, so i'm not game to try the second!!!!!
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
Post Reply