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
Qualcomm reportedly in talks to build custom video chips for TikTok parent ByteDance by Karthik Mudaliar
Qualcomm is reportedly in advanced discussions to provide custom chip-design services to Chinese tech giant ByteDance, the same company behind TikTok. According to a report from Reuters, Qualcomm could be involved in designing custom silicon tailored for ByteDance's massive data-center workloads.
If it goes through, the deal would make ByteDance one of Qualcomm's early anchor customers for its fastly growing custom chip-design division,
For years, Qualcomm was the king of making smartphone processors and modems. The company has also been moving into the PC ecosystem and other formats such as on-device AI for Android XR headsets. However, this particular deal is about Qualcomm's custom Application-Specific Integrated Circuits (ASICs).
For a platform like TikTok, ByteDance needs hardware that can help it ingest, process, and serve billions of short-form videos daily. Generalised hardware is no longer the most cost-effective and efficient route, which is why ByteDance is trying to develop custom Video Processing Units (VPUs). VPUs designed specifically for ByteDance’s algorithmic needs could drastically reduce data-center power consumption and improve encoding speeds at an unprecedented scale.
The underlying tech behind these processors is actually from Qualcomm's recent acquisition of AlphaWave Semi, a high-speed connectivity specialist company. By combining AlphaWave’s high-bandwidth IP with Qualcomm’s architectural expertise, the company could begin mass production by the end of 2026, if the talks go through.
All this also comes at a time when U.S.-China tech relations have dwindled. Escalating trade frictions between Washington and Beijing have severely impacted the export of high-end AI chips from U.S. firms like Nvidia, AMD, and Lam Research.
Yet, the Qualcomm-ByteDance discussions show that U.S. tech companies are still actively seeking growth avenues and are open to doing business with China, where regulators still permit.
Reuters notes that the outcome of this deal could be uncertain, and ByteDance might also seek partners other than Qualcomm.
via Reuters | Image via DepositPhotos.com
I wonder how driving laws around the world will change. No way to really tell if people are using phone. Same with smart watches i guess even now and those silly built in tablets for controlling the car instead of buttons.
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
<div id="sidebar"> <h3>Related Videos</h3> <ul id="related-videos"> <?php $the_query = new WP_Query( array( 'posts_per_page' => '5', 'post_format' => 'post-format-video','category_name' => 'hip-hop') ); while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <li> <a href="<?php the_permalink();?>"> <div class="side-thumb"><?php the_post_thumbnail('small'); ?></div> <?php the_title(); ?><br /> <script type="text/javascript"> $(document).ready(function () { $.getJSON('http://gdata.youtube.com/feeds/api/videos/<?php echo getYouTubeIdFromURL(get_post_meta($post->ID,'video',true)); ?> ?v=2&alt=jsonc',function(data,status,xhr){ $("#yt_time-<?php echo get_the_ID(); ?>").html(data.data.duration); $("#yt_views-<?php echo get_the_ID(); ?>").html(data.data.viewCount); }); }); </script> <span><div class="yt">Duration: </div><div id="yt_time-<?php echo get_the_ID(); ?>" class="yt"></div><div class="yt"> | </div><div class="yt">Views: </div><div id="yt_views-<?php echo get_the_ID(); ?>"class="yt"></div></span> </a> </li> <?php endwhile;wp_reset_postdata();?> </ul><!-- #related-videos --> </div><!-- #sidebar -->I think this is the solution, but I don't exactly know how to use it. This code is from Stack Overflow.
<?php date('Y-m-d H:i:s', strtotime(sprintf('- %d second', round($speed * 60)))); ?>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