- 0
Convert Video Duration Number to Time with PHP or jQuery
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Posts
-
By zikalify · Posted
Is the Start menu needed? Yes. Is it needed in its current form? No. I run lubuntu, it has all my apps sorted into categories, a bunch of preferences and system tools, the option to turn off, and search. It's all in a small rectangle and does everything you need it to. -
By LoneWolfSL · Posted
Star Citizen Alpha 4.2 update lands with radiation hazards, dynamic rain, and more by Pulasthi Ariyasinghe The crowd-funded sci-fi RPG Star Citizen has received another update to its public alpha build. This time, developer Cloud Imperium Games has delivered new features like radiation as a brand-new hazard, irradiated creatures, the first implementation of a dynamic weather system for planets, and more. Dubbed Storm Breaker, Alpha update 4.2's cinematic trailer can be caught above, showing off the new sandbox activity. Storm Breaker is the name of the new sandbox activity too, continuing the ongoing Regen Crisis narrative. Players will be going to Pyro 1 and 4 while uncovering the experimentation secrets of the Associated Sciences & Development company while also weathering a never-ending storm, irradiated zones, and dangerous creatures to complete the event's tasks for hard-earned loot. Speaking of radiation, players will need to wear specialized gear and navigate carefully whenever they come across these special hazardous zones on planets. "This update adds new Radiation accumulation, resistance, and falloff thresholds to player status effects," says the developer. "These effects will appear as new visual and player status cues with REMs on the HUD and can cause consequences resulting in player injury or death if not treated." Locations on Stanton and Pyro planets can now have rain happen on them at various locations and times. Cloud Imperium calls this the first implementation of its Genesis: Dynamic Weather system. When ready, the full version of this tech will be rolling out to many more planets and will supposedly have rain and cloud formations, lightning, relevant audio, water pooling, and clothing shaders for wetness. Other changes of the update include better missile and torpedo tracking, new explorable locations, irradiated juvenile sandworms to fight, fixes for space stations and landing zones to reduce clipping and glitches, and much more. The complete release notes for the update can be found here. Star Citizen Alpha 4.2: Storm Breaker is now available for all backers in the Live channel. -
By Tuskd · Posted
I envy EU residents... in a good way -
By MrElectrifyer · Posted
It's likely going to be the on-board models that have been finetuned to perform all the Galaxy AI processing needs, thus eliminating any need for the cloud/subscription... -
By Tuskd · Posted
They did remove the Start button with Windows 8, but everyone had their pitchforks out. That OS had its many issues, but you could work on a desktop environment without the Start. Safe to say not many liked it.
-
-
Recent Achievements
-
Wayne Robinson earned a badge
Week One Done
-
Karan Khanna earned a badge
One Month Later
-
Karan Khanna earned a badge
Week One Done
-
MikeK13 earned a badge
First Post
-
OHI Accounting earned a badge
Week One Done
-
-
Popular Contributors
-
Tell a friend
Question
Mr.XXIV
I'm loading the YouTube API by jQuery + JSON to get the video info of it's views and duration.
The duration number for example is 210 sample, but in actually time, it's 3:30. :)
The problem is, I'm not sure how to come by to converting the numbers to actually time, not even with PHP's strtotime since I believe jQuery would load too late for that. (Or I don't know at all.) :p
I think this is the solution, but I don't exactly know how to use it. This code is from Stack Overflow.
Here's a screenshot of what I'm working on. Check out the "Related Videos" on the bottom right.
Link to comment
https://www.neowin.net/forum/topic/1111301-convert-video-duration-number-to-time-with-php-or-jquery/Share on other sites
19 answers to this question
Recommended Posts