【问题标题】:Android Streaming HTML URL to PlayerAndroid 将 HTML URL 流式传输到播放器
【发布时间】:2015-04-19 08:39:36
【问题描述】:

我正在尝试创建一个类似于此移动网站的链接: http://m.tn.com.ar/

当我点击链接En Vivo 时,它会将我重定向到http://m.tn.com.ar/envivo/24hs

但是,在 PC 中,什么也没有发生。相反,在 Android 中,它使用 Player App(我使用 Android VLC Player)打开一个实时流媒体视频。

如何使用具有流式 URL rtsp://stream.tn.com.ar/live/tnhd1 的 HTML、JavaScript 和/或 PHP 建立这样的链接?

【问题讨论】:

标签: android streaming vlc android-video-player video-player


【解决方案1】:
<?php
// USER AGENT VAR
extract($_SERVER);
$sua = str_replace(array('.',';',':','(',')','-','_',','),array(' '),( str_replace(array('/'),array('.'),strtolower($_SERVER['HTTP_USER_AGENT'])) ));

if(preg_match('/android/',$sua)){
    // IF ANDROID EXTERNAL APP
    header ("Location: rtsp://stream.tn.com.ar/live/tnhd1"); 
}else{
    // IF PC FLASH
    echo "Reproductor flash usando el streaming rtsp://stream.tn.com.ar/live/tnhd1";
    }
?>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-25
    • 1970-01-01
    • 2021-03-13
    • 1970-01-01
    • 2011-12-16
    相关资源
    最近更新 更多