LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-04-2010, 07:28 PM   #1
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Question Safari: Not the Error Message I Want


Hi, I've got some code in an HTML page like so:

Code:
<video src="http://robots.arsc.edu/video/boe-bot-emptiness.ogv" controls>
<b>There is supposed to be a video here, but your browser does not support the Ogg Vorbis video format. These videos can be viewed natively from within the Firefox web browser, versions 3.5 and greater.</b>
</video>
This displays the OGV video natively in Firefox just fine, like it is supposed to do. In other browsers it is supposed to just display the error message contained inside the bold tags. The error message displays correctly in Internet Explorer, but when I open the page in Safari, instead of the error message Safari displays a frozen, empty video box.

What would be the simplest solution to this? I'm okay with the video only being viewable in Firefox, but I don't want people visiting with Safari to think that the videos are simply broken.
 
Old 01-04-2010, 07:36 PM   #2
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
Why don't you convert to a format most browsers support, like windows AVI (i know. i know)
I have never even heard of ogv but AVI is supported in FF, IE and probably safari.
 
0 members found this post helpful.
Old 01-05-2010, 12:51 AM   #3
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375

Original Poster
Blog Entries: 24

Rep: Reputation: 43
Quote:
Originally Posted by smeezekitty View Post
Why don't you convert to a format most browsers support, like windows AVI (i know. i know)
I have never even heard of ogv but AVI is supported in FF, IE and probably safari.
Thank you for your suggestion, but in the future please do not use up the zero-reply status of my post unless you have an answer to the question I asked.

I use Ogg Theora because it is my small way of promoting freedom. Mozilla had the courage to support it, and by giving it native support in a popular, cross-platform browser, they made it practically possible for a truly open, patent-free video compression format to be exposed to millions of people. But that doesn't make much difference if none of us developers actually use it.

I don't always have the freedom to support my ideals as I would like, but this time I do.
 
Old 01-05-2010, 01:17 AM   #4
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
Code:
<script language="javascript”>
if (navagator.appName==”Safari”) //Or was it apple Safari?
{
document.write(’Sorry, the video is not supported on your browser’)
}
else {
document.write('<video src="http://robots.arsc.edu/video/boe-bot-emptiness.ogv" controls>
<b>There is supposed to be a video here, but your browser does not support the Ogg Vorbis video format. These videos can be viewed natively from within the Firefox web browser, versions 3.5 and greater.</b>
</video>');
}
</script>

Last edited by smeezekitty; 01-05-2010 at 01:18 AM. Reason: !!!!!!!!!
 
Old 01-11-2010, 08:33 PM   #5
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375

Original Poster
Blog Entries: 24

Rep: Reputation: 43
Quote:
Originally Posted by smeezekitty View Post
Code:
<script language="javascript”>
if (navagator.appName==”Safari”) //Or was it apple Safari?
{
document.write(’Sorry, the video is not supported on your browser’)
}
else {
document.write('<video src="http://robots.arsc.edu/video/boe-bot-emptiness.ogv" controls>
<b>There is supposed to be a video here, but your browser does not support the Ogg Vorbis video format. These videos can be viewed natively from within the Firefox web browser, versions 3.5 and greater.</b>
</video>');
}
</script>
Thanks. Correct me if I'm wrong, though: a consequence of the fix is that if the user has javascript turned off, nothing will display at all. (Not even an error message.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Safari under Wine Spudley Linux - Software 2 07-16-2008 05:39 PM
Safari on Windows, so? Hitboxx General 42 06-21-2007 03:54 AM
Strange Repeating Error message in /var/log/message lucktsm Linux - Security 2 10-27-2006 08:29 AM
Error message received from system Error while reading filter description for true Steel_J Linux - Software 2 03-04-2006 06:10 PM
QMAIL error:554 Transaction failed: message format error mpk25 Linux - Software 1 10-15-2004 12:53 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration