Detecting changes in Youtube webpage - plugins

I'm creating a web plugin for youtube, however im facing some issues like
Suppose we are on youtube home page, now how would i know if some new video has been loaded in our home page(like whenever we open the youtube page first 24 videos are loaded and then as we scroll down more 24 are loaded and so on..) and i want to detect this change so i can do my analysis accordingly.
Also im using mutationobserver and i've tried with document.location.href, however this only gives the root url i.e https://www.youtube.com/ and using this i cannot detect any change in content.

Related

TWA bases app sometime showing URL and sometime working, even Assetlink.json uploaded properly

I have website (https://www.kriscent.com/product/kart-supermarket/). I created PWA of that after that I uploaded it on Play store by using TWA(Trusted Web Activities), App URL is https://play.google.com/store/apps/details?id=in.kriscent.kartlite.
The URL of website always show in app, So I uploaded the assetlink.json (URL: https://www.kriscent.com/.well-known/assetlinks.json).
After uploading the assetlinks.json, When I run my app, the website URL disappeared but when I switched on other link in the app then the URL shows again.
I don,t know what is happening. Please help me if anybody has idea to resolve this issue.
enter image description here
enter image description here
The problem is that, when navigating to a product detail page, you are using a different origin than the one used to open the Trusted Web Activity and that doesn't have Digital Asset Links setup:
When the application is started, it opens https://www.kriscent.com/, which is correctly validated.
When clicking on a product, the user is take to https://kriscent.com/ (without www), which is a different origin, and is not validated in the Android app.
It is possible to get the Trusted Web Activity to work with multiple origins but, in this case, I'd recommend using a single origin for the initial URL and the navigations, as you will be able to take advantage of using the same service worker, browser storage, etc.

Precache html pages in flutter

I have a list of some HTML pages that i show in my web_view. The problem is that it will load slowly when network is slow or wont show at all if user is offline. So i want to pre-cache all the URLs before navigating to that page. After that I want to load from the cache and navigate through the URLs on swipe. (The Swipe part is done with URLs loading real-time). My question to you is how do I pre-cache every URLs and call it in my web_view later
If you are sure that those pages are static..I have a suggestion for you..
Like you said, you can pre-cache..
Initially, when internet is available you get the code of those URLs using
http package and store it in local storage, say some .txt file.
And then, when you want to show the page in your app, again..as it being static page, you can read the html code from local storage and show it in your app using html package.
Hope it answers your question.

Soundcloud: Stratus player continue to play across pages?

I'm confused about whether the Stratus player for SoundCloud can play continuously between pages, or at least pick up the track where it was.
SoundCloud describes the STratus player as follows... "A bunch of you told us that the only SoundCloud player that was missing was one that would float on the top or bottom of a site and continue to play as you switch pages, we feel like we've solved that with our Stratus player!" (http://soundcloud.com/101/stratus)
But on the Stratus2 page it says "Can I keep Stratus playing even when the page reloads?
Not currently." (http://stratus.sc/)
Is there some way to have SoundCloud play continuously between pages, or at least pick up the track where it was?
It looks like you can achieve this with the HTML5 History API.
The HTML5 history API is a standardized way to manipulate the browser
history via script. Part of this API — navigating the history — has
been available in previous versions of HTML. The new parts in HTML5
include a way to add entries to the browser history, to visibly change
the URL in the browser location bar (without triggering a page
refresh), and an event that fires when those entries are removed from
the stack by the user pressing the browser’s back button. This means
that the URL in the browser location bar can continue to do its job as
a unique identifier for the current resource, even in script-heavy
applications that don’t ever perform a full page refresh.
Can I keep Stratus playing even when the page reloads?
Not currently. Your site would need to be built so that it doesn't
reload rather than the player. However, we do provide a popup function
that users can click to enjoy your tunes while browsing your site.
I'm guessing that the line about changing pages refers to possibility of popping the player out and navigating the website. You could also build your website with something like pjax and then keep stratus in the “footer” so navigating your website will only update the contents.
I hope this helps.

iPad add to homepage stops site from working

I'm using the IOS simulator iPad/ ISO 4.3.2 (8H7)
I'm working on a web based app for the iPad, it works fine being viewed as a webpage on my local host.
However, when I click add to homepage button and access the site via the icon on the homepage.
All the 'a' tags stop working.
EDIT: I've found another post that people mention the same issue. See the second and third posts down.
iPad WebApp Full Screen in Safari
The only way I have been able to get this to work is by changing all my 'a' tags to the following.
a href="javascript:this.location = 'page.php'"
For some reason when you link with javascript it stays in the same window.

View HTML code of a iPhone WebApp that's on the Home Screen

Does anyone know how to view the HTML code of a webapp that's saved to the iPhone home screen? Some webapps redirect to a different html file when they get "promoted" to the home screen. It's that code I'd like to examine.
According to Apple's documentation, the mode in which a webapp is being viewed can be retrieved using JavaScript. So, if you send the iPhone's User-agent header from your computer and then grab a copy of the first HTML document that gets served up (before JavaScript has a chance to do any redirects) you should be able to find some JavaScript code that decides how to display the webapp based on the iPhone viewing mode.