firewall-related problems when using YouTube iframe API - youtube-api

I built an educational web-based game that relies heavily on YouTube-hosted videos played back through the YouTube iframe API which accesses this script file on YouTube's server:
https://www.youtube.com/iframe_api
I am running into two problems when running the game from within a higher-security environment such as is often found within school buildings:
1) In some school systems YouTube is blocked so the game fails at the point when the first movie tries to play. (Other than moving the movies totally off of YouTube and finding another playback mechanism, I don't know any way to resolve this except to try to convince the administrators to loosen the YouTube restrictions on the network.)
2) Even when the global YouTube block is removed from the firewall, in some cases the game is behaving as if the above script file is totally missing. My theory is that some of the firewalls are also configured to block cross-site scripting.
Has anyone experienced one or both of these problems, and if so, how were you able to resolve? In dealing with #2, would it be possible (or even advisable) to pull the JS code from the youtube location and make a local server copy to avoid the presumed cross-site script blocking?
Any help or advice would be much appreciated!

It is fine to host the code for the api locally but that wouldn't solve the problem of the videos being blocked since they too reside on youtube.com.
If loading videos from YouTube is part of the game then you need to communicate that having access to YouTube is a requirement to play it. I don't think there is another option.

Related

WebRTC no video with some networks

I create web app with Ruby on Rails using WebRTC for video connections (with SimpleWebRTC: https://simplewebrtc.com/). It works on remote server, and use signalmaster (https://github.com/andyet/signalmaster). Everything works good on most networks, but sometimes there is no remote video. I have callback from videoAdded, but there is completely no video from other peers. I think it might be something with that network configuration, but have no idea what. Does anyone have idea what's wrong?

Streaming live desktop video to a web application

I'm looking to find a way to stream a user's desktop LIVE (through some piece of software, such as Open Broadcaster Software) to a web application.
I'm assuming I should use a CDN to get the live streamed video to my web application, but how (and what software should I use) to get the user's desktop to a streaming service? Should I use a service such as Red5 or an AWS service? Or if only a few viewers are using it, should I host the service myself?
Although I have built my share of web applications, I have never dealt with live media streaming before, and I would appreciate any assistance anyone could lend.
By far the best resource for video on Rails is OpenTok
Our own demo here: http://bvc-video.herokuapp.com/broadcasts/1
--
Streaming
Video streaming is a tough one
The problem is really dependent on what you're trying to stream. If it's "live" video - I.E captured & sent directly to the viewers, you'll have to use some sort of server to process the video.
Although I don't have huge experience with this, the main issue we've found is the compression / distribution of the feed. It's actually very simple to acheive video streaming on iOS - all the software / hardware is the same (just use the same API / drivers)
This often negates the requirement for a central server, although it's highly recommended (almost required) for many cases. Problems arise when you try and beam to multiple clients on multiple systems; as you'll run into compatibility issues
--
Solutions
The solutions we've found are thus:
The most stable part of the app is to take the stream & send to a server
The wizardry will then be to beam that stream to multiple clients
The way to do this is typically to use a flash widget & pull the stream from the server
WebRTC is becoming the standard (OpenTok is built on this)
I'm not sure about video compression / distribution. Akami is an industry heavyweight, but I've never used it. Brightcove too

How to stress-test HTTP Live Streaming

We built an youtube-like Rails application that serves videos using HTTP Live Streaming which are hosted on our company's S3-like (actually Ceph Object Gateway S3 API) cloud service.
It's the first public application on that storage service and we would like to know how much concurrent viewers it can handle beforehand.
We know that the network connection (10Gbps) will become the bottle neck at a certain stage, but we have no idea how much load the actual storage cloud service is able to handle.
How would you stress-test the HTTP Live Streaming?
Is something similar to this (UDP) suggestion an option in this (TCP) case?
You can use either a JMeter SAAS or cloud servers to overcome the network issue, and for JMeter you can use this commercial plugin which simulates realistically the Players behaviour and give useful metrics:
http://www.ubik-ingenierie.com/blog/easy-and-realistic-load-testing-of-http-live-stream-hls-with-apache-jmeter/
Metrics provided by plugin are:
Buffer fill time (time it took to start playin)
Lag Time (How many seconds play paused)
Lag Ratio (waiting time over watching time)
Disclaimer : We are behind the development of this solution
If you're testing HTTP streams you might be able to test it using JMeter though you'd probably need a hosted JMeter solution to create enough traffic.
I'm not sure if you'd be able to get any helpful response time info, but you would at least be able to easily create and ramp up the load.
Let me know if you need help with the JMeter side.

Embeddable or web servers requiring no installation

I am working on a c++/cli program that which records live video (I use OpenCV). Now I need to facilitate it with broadcast support where other people can watch it by using their web browser. As you know videos are sequence of images so I need the web page to get the new "frame" grabbed from the web cam and display it in web page in speed of 5 times in every 1 second (5fps). For this, in order to allow others to access the web page, I need a web server (running in localhost is OK because connected machines can access it).
I am not up to web technologies so I have only used Apache Tomcat and Microsoft default server.But in both, you have to setup the server, upload the files to it and much more. But there are some programs like this and this where they do not require such servers where you need to install and setup but still does the job. I think they are using embedded web servers.
So, are there are any servers like that which matches to my requirements? Please note my program is in c++/cli and I need to distribute the server with it as well, just like the above 2 programs do.
Edit
Please note that I mentioned C++ / CLI just to give you a clear understanding about my system and not because I am seeking for a server with CGI script support or I m seeking for a server built with c++. If at least JavaScript can run there that is enough because I can update using it.

How is SkypeKit different from programming with the Skype API?

I have a lot of experience writing Delphi 6 Pro apps using the Skype API. I don't use the COM object but instead I interface directly with the Skype client using the SendMessage() system. My current application acts as a full duplex audio proxy with video transmit. To transport audio I use ALTER CALL with the PORT parameter to establish a duplex audio connection with the Skype client via a pair of sockets. For sending video I have a DSPACK based DirectX filter that I instruct the Skype client to select as the chosen video device. This works fine but since it's the Skype API I have the awkwardness of interfacing with the Skype client as a separate entity.
Now along comes SkypeKit which apparently allows a developer to integrate Skype in a much more integrated manner. I'm about to dive into it and I wanted to hear from any developers out there that switched over from the Skype API to SkypeKit. Some questions:
Was there anything missing from SkypeKit that is offered via the Skype API that made your app conversion difficult if not impossible?
Do you have any tips on making the transition as smooth as possible, especially when it comes to avoiding any design choices that can really come back to haunt you when you get far down the SkypeKit path?
Did you find any web resources or documentation from other developers that were really helpful in saving you time or trouble? (Please share links if so).
I am using SkypeKit in my chat-centric Java application so I haven't dealt with A/V.
SkypeKit is just a “black box” program that interacts with Skype protocol by iteslf. It is an executable that starts a process which listens on local port. The process is lightweight, only 20mB on my Windows-based developer machine. It runs completely in background, there are no any notifications at startup/messaging/shutdown.
Your client program interacts with it by sending byte structures via local SSL tunnel. These structures are wrapped by API for C++, Java and Pyton. Java API is easy. You start the process, create new Skype() object and login with your Skype account credentials and get your program callbacks execution when some events happen.
So #Whiler is not completely right, you always need a host application, but in this case this one is small and fast.
I don't know how hardware-based kit works but I think it is a more low-level way.
You can read the Java API here, C++ API (with examples) here, and Python (with examples) here.
Oh, and at least one small difference between desktop API and kit-based one: you can post XML text in the chat.
SkypeKit is no longer supported - https://support.skype.com/en/faq/FA12322/is-skypekit-being-discontinued
Disclosure: I used work for Microsoft/Skype
The main difference between SkypeKit and the other solutions (sendmessage, COM) is that the Skype client application is not needed... you can directly interact with the skype network...
I haven't dig this solution as the access is not free (not expensive, but without real projet, this was a no go for me...).
So this can be very useful if you plan to replace the real skype client with your own software on final machine... but if you just want to interact with an existing one, I'm not so sure.

Resources