How to replay a webpage using captured http traffic? - html

If I capture all traffic from a webpage which contains video(e.g. a Youtube Live channel), is there any way to replay the webpage using these traffic?
I try to use Selenium IDE to implement the function of record and replay. However, it can only record users' actions, not webpage elements, let alone the videos in webpage.
Screen recording is an alternative way, but it is not what I want.

Related

Cast an entire webpage to tv?

I need to cast an entire webpage (which includes images, videos, iframes and carousels) to a chromecast enabled TV.
Once loaded, the webpage is auto scroll enabled and hence keeps showing few images, videos and iframes (think of it like a looped slideshow).
I know there's an option in the chrome browser itself to cast a tab/entire desktop, but it would require my laptop/computer screen to be open all the time.
I also came across chromecast for web app docs: https://developers.google.com/cast/docs/chrome_sender/integrate , but as far as I can figure out, it will help only to cast videos but not iframes/carousels embedded in my website.
Any suggestions how to achieve this? The requirement is to show an advertisement kind of data to the TV in every 3 hours. All this cannot be automated fully I guess?
Yes, you can do this. You just need to create a custom receiver app, which is basically just an HTML page that implements the cast receiver framework javascript. https://developers.google.com/cast/docs/caf_receiver/basic

Google Chrome extension: background page or event page?

I'm building a Google Chrome extension at the moment and I have a question about when to use an event page.
A quick look at the Chrome extension docs shows that Google really want its developers to use event pages, if possible.
My extension currently uses a background page, but I was wondering if I should switch to an event page?
This is what my extension does:
When matched with a particular website, it injects a script that adds buttons for the user to access extra functionality.
Most of this extra functionality consists of doing fairly computationally expensive operations on user-entered data - this is all done in the background page (it is all it does).
When a user wants to run these operations on their data they press a button and this passes a message, from the injected script to the background page, which then passes a message back containing the results of its operations.
Essentially, all the background page is doing is waiting for message passing from an injected script in one particular website and then running some operations. Since it doesn't need to be active all the time, this suggests that I should be using an event page.
Can anyone confirm if this would be a good idea for me? Or are there reasons why I should stick to a background page?
Allowing the background page to suspend (chrome.runtime.onSusend) is great, because it will free up system resources. The page will automatically be launched when a matching event happens (chrome.tab.onUpdated etc). I can't think of any compelling reason to use a persistent background page. You can always store any long term state in chrome.storage.local or indexedDb, etc.

Least intrusive webcam capture in browser

I need to capture webcam images from inside browser. I am planning to use Flash but since am not experienced in it, before jumping into it, I want to ask you experts :
Will Flash ask for Webcam permission every time user refreshes the page ? Isn't there some global security setting to allow a website.
Is it essential to display the webcam feed on the browser to be able to capture it / take snapshot and upload to server. I totally don't want to show live feed on the webpage, all I want is to take snapshots and upload it in the background.
The purpose of above requirement is that we are trying to add proctoring to our online assessment platform, and hence we don't want to reload / ask for permission again every time candidate views a new test page. One alternative can be making the whole site a single page webapp, but definitely that will add quite some overhead.

Continuous Music Embed between pages

I know this is not a widely favorable feature, but I've had to add a continuous music player to a web project of mine, at a client's insistence. Does anyone have a solution to keep the music playing continuously between pages? The client wants it to auto-play. The solution I have currently uses I-frames, but it's clunky – the pages don't have a unique URL, and the site does not properly come up in thumbnail on social networking sites, because everything is buried in a frame.
So far, I've tried:
A voluntary pop-up window that the user clicks on to start the player. Client did not like this because the music doesn't auto-play. I'm afraid having an automatic pop-up would be hidden by most browsers.
A flash music player that remembers where the user last left off on a song file, and loads from there the next time it is called for – unfortunately there are gaps in the playback (since the player has to be reloaded with every new page,) and the client is not satisfied.
The I-frame solution I have currently.
You could use jquery and ajax to dynamically load in your content ie you have a "container" page which you then use ajax to pull in various content so it looks like you moving to "another" page

Continuous playing swf on Static Website

I have a music player swf embedded on an html page. Is there any way to have the music continuously play, even when the different html pages are loaded? When a link is clicked, the page is refreshed, also restarting the swf(music).
If the site was AJAX driven, this wouldn't be a problem, but all my pages are static. I suppose I could put the entire body in an iframe, but there has to be a better option. I am certainly open to the idea of using ajax here, but I do not have much ajax experience. Any ideas?
Ajax is really not that hard to learn, use it.
If you reload another page or the same page with a normal link, you will lose your current status in your embedded player. So you either have to use a non-standard link-mechanism, separate your player from the page or save your current status on change of the page. Your options basically are:
Use Ajax and never actually load a new page, but only new content (<- best solution, imho)
Use the standard link mechanism, but do it in an iframe, the player runs in a parent page (I agree with you, that wouldn't be nice)
Load the player in a new Window, put it in the background or something. This might be better than the iframe-solution, but you might get some difficulties with popup-blockers. Remember to close your popup when the user leaves your page.
Save the status of the player in a cookie whenever a link is clicked. On pageload check for the cookie and continue playing at the saved position. This will result in small breaks during playback and you need to be able to interact with the music player.