Skip to content

Instantly share code, notes, and snippets.

View hackstarsj's full-sized avatar
🏠
Work from home

Sanjeev Kumar hackstarsj

🏠
Work from home
View GitHub Profile
@BackFront
BackFront / HTML5_player.html
Last active May 27, 2023 16:04
Pseudo Streaming MP4’s with PHP
<video controls="" width="400">
<source src="http://66.128.61.175/reel/1cc976948e74aa62f7a7fde16e64fb6b/360p" type="video/mp4">
Your browser does not support HTML5 video.
</video>
@alexfu
alexfu / FragmentObserver.java
Last active June 21, 2024 19:11
Observer pattern for notifying Fragments of a ViewPager to update their views. This will update the current Fragment, as well as the off screen Fragments that are retained.
public class FragmentObserver extends Observable {
@Override
public void notifyObservers() {
setChanged(); // Set the changed flag to true, otherwise observers won't be notified.
super.notifyObservers();
}
}