inject javascript code into safari on os x - macos

I want to be able to speed up html5 video playback to 2x while using my browser as ipad agent.
Could I do this as a bookmarklet using the code found here?
http://www.learningapi.com/2012/04/variable-speed-playback-html5-video-feature/

Related

Mac OS external monitor cannot play streaming video in Safari

I have a brand new MBP, I have tried everything that I can think of and googling and apple support is no help.
In safari 15.1 , a clean install of it, I cannot play streaming video on external monitor through thunderbolt.
If I have the MBP unplugged, it plays the video in safari no problem. However the moment that I hook up an external display, the video play back in safari does not work.
Edge, Chrome, Firefox, DuckDuck Go, and Opera all work fine. this is 100% a browser issue with Safari and Only while hooked up to an external monitor.
Any idea?

AVFoundation CoreMedaIO virtual camera not being detected in browser

I have been testing the Apple CoreMediaIO sample camera on Mac OS X 10.9 Mavericks.
Locally the applications i have tried could detect and recognize the sample camera automatically (like Skype, AVRecorder - Apple's AVFoundation capture API sample)
In Mozilla Firefox and Opera browsers the camera has been detected automatically on the Flash Player based sites that i have checked (for example Adobe's Cirrus sample), although in Safari and Chrome the sample camera was missing from the video input devices list.
How could i make these browsers recognize the CoreMediaIO sample camera on such a website?
Safari:
The problem causing this to happen is that on Mavericks the current Safari uses a sandboxed Flash Player which refuses to detect the sample camera.
You can solve this by allowing sites to run Flash Player in unsafe mode: (make sure you have allowed the website to use your cameras on the Flash Player pop-up window)
Go to Safari/Preferences.
Go to the Security page.
Click Manage Website Settings.
On the left pane select Adobe Flash Player.
Select the website you have allowed to use the camera and want to use the camera with.
Click on the combobox.
Select Run in Unsafe Mode.
On the pop-up window choose Trust.
Refresh the website.
From now on, Safari can detect the sample camera on the specific website.
I could not find a better/all-around solution yet.
Chrome:
This problem is mainly based on the Mac OS X AVFoundation API being disabled by default in the current Chrome (the CoreMediaIO sample uses it).
There are various methods to make Chrome detect the sample camera.
So far my best solution is the following:
Open a new tab in chrome.
Go to chrome://flags.
Search for "Enable use of Mac OS X AVFoundation APIs, instead of QTKit, Mac" entry.
Set the above-mentioned entry to Enabled.
Relaunch Chrome.
As far as i could get, the key AVFoundation flag's internal ID is IDS_FLAGS_DISABLE_AVFOUNDATION_NAME.
As long as you try to use AVFoundation based things in Chrome (OS X Mavericks) you will probably need this. (I don't really know why the default value is disabled, but i hope they will change it as Apple tends to deprecate QTKit.)
Other solutions that i prefer less:
Disabling Pepper Flash (PPAPI) and using NPAPI Flash Player instead.
Open a new tab in chrome.
Go to chrome://plugins.
Hit the plus (+) sign in the upper right corner next to Details.
Search for the Adobe Flash Player plugin section.
Locate the Pepper Flash version (PPAPI type).
Click Disable.
Refresh the website.
Google intends to deprecate NPAPI Flash Player soon, which leaves the Pepper Flash (PPAPI) as the only alternative, that was the reason to try and find a better solution than this. I don't recommend to rely on this solution considering the future of NPAPI Flash Player.
There is another temporary solution involving Mozilla Firefox. I don't know why exactly this works and i think this might easily change in the future, but i tried and verified that it works at the moment:
Close Chrome entirely (Chrome/Quit Google Chrome or Command+Q).
Start Firefox.
Go to the website you would like to use the camera with (any Flash Player based site works that calls for camera list).
Open Chrome.
Close Firefox.
Go to the website in Chrome.
If you close Chrome you will have to redo the process from Step #2. It seems like Firefox initializes something that makes the Chrome startup different and causes it to detect the sample camera. I don't recommend to rely on this though.

Capture video from webcam in safari

Is it possible to capture video stream in Safari (OS X) with native API without using any external plugins (flash, silverlight, etc...)? Is there an analog of chrome/firefox 'navigator.getUserMedia'?
getUserMedia is currently not supported in Safari (source.) IE is also a laggard in this regard. So to answer your question, you will need to use a plugin or fallback.

safari mac wont stream HTML5 video

I am having a very frustrating issue with HTMl5 video and safari/mac.
I am using html5 video throughout the site where needed and it works/plays on every browsers bar safari on a mac (its fine on safari windows and chrome mac for example)
The videos dont stream and only play once the entire file is downloaded. At first I thought it may be to do with the index of the file being at the end and not the beginning (link html5 video = safari wants to download it all) so i tried qtindexswapper but when loading the MP4 into the program it said the MOOV/Index was in the correct position.
Anyone have any idea why safari mac has this issue?
A.
I've seen HTML5 be very picky with videos. They may play fine in a player, but not play or maybe play with no audio once embedded. This is usually due to a video not properly created/formatted. In most cases, re-creating the file in a professional level program alleviates the issue.

Why the set of plugins can be different between Safari and WebView component?

Our Mac desktop application embeds WebView component from WebKit framework.
Inside WebView we host Flash Player where we render UI.
As far as I know, Safari uses WebKit/WebView to display the content.
We were expecting Safari to host the same WebView component our application hosts.
In other words, if Flash plugin is installed in Safari, than Flash will be available in our WebView.
Unfortunately this appeared to be wrong for one of our users.
On his Mac, Flash runs flawlessly in Safari, but our WebView displays "Missing Plugin" message in place of Flash Player.
Mac OS X 10.5.8
Why this can happen?
Is it possible Safari to use a different WebView (or WebView settings) than our application is using?
I would appreciate any advice that would help us to find the source of the problem.
I have asked the user to run a small script that prints a set of plugins installed for Safari and for our WebView.
There are around 20 plugins installed in Safari, including Flash Player.
But there are only 3 plugins installed for our WebView.
Here they are:
Java Plug-In 2 for NPAPI Browsers
Switchable Java Plug-In for WebKit
RealPlayer Plugin.plugin
Pasha
Is it possible Safari to use a different WebView (or WebView settings) than our application is using?
Yes, very much so. A WebView is simply a class, and Safari uses one instance of such a class, which doesn't get modified for a plug-in. The Flash plug-in is installed for the browser (as in, Safari keeps track of where it is installed and looks for it as necessary). Cocoa's WebView doesn't get modified whenever a plug-in is installed—that could lead to all sorts of issues.

Resources