- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是完整的日志:
03-20 22:49:26.953 4986-4986/? I/art: Not late-enabling -Xcheck:jni (already on)
03-20 22:49:26.955 4986-4986/? W/art: Unexpected CPU variant for X86 using defaults: x86
03-20 22:49:27.232 4986-4986/com.example.alphie.androidvideostream W/System: ClassLoader referenced unknown path: /data/app/com.example.alphie.androidvideostream-1/lib/x86
03-20 22:49:27.250 4986-4986/com.example.alphie.androidvideostream I/InstantRun: starting instant run server: is main process
03-20 22:49:27.535 4986-4986/com.example.alphie.androidvideostream W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
03-20 22:49:27.737 4986-5002/com.example.alphie.androidvideostream I/OpenGLRenderer: Initialized EGL, version 1.4
03-20 22:49:27.737 4986-5002/com.example.alphie.androidvideostream D/OpenGLRenderer: Swap behavior 1
03-20 22:49:27.738 4986-5002/com.example.alphie.androidvideostream W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
03-20 22:49:27.738 4986-5002/com.example.alphie.androidvideostream D/OpenGLRenderer: Swap behavior 0
03-20 22:49:27.741 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglCreateContext: 0x9f6316c0: maj 3 min 0 rcv 3
03-20 22:49:27.743 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:49:27.784 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:08.625 4986-4986/com.example.alphie.androidvideostream W/MediaPlayer: Couldn't open https://youtu.be/oEgpGv2CF1U: java.io.FileNotFoundException: No content provider: https://youtu.be/oEgpGv2CF1U
03-20 22:58:08.635 4986-4998/com.example.alphie.androidvideostream D/NetworkSecurityConfig: No Network Security Config specified, using platform default
03-20 22:58:08.666 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:09.980 4986-5049/com.example.alphie.androidvideostream E/MediaPlayer: error (1, -2147483648)
03-20 22:58:09.980 4986-4986/com.example.alphie.androidvideostream E/MediaPlayer: Error (1,-2147483648)
03-20 22:58:09.980 4986-4986/com.example.alphie.androidvideostream D/VideoView: Error: 1,-2147483648
03-20 22:58:10.069 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:10.092 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:10.131 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:10.141 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:11.625 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:11.647 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:11.661 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:11.669 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:11.675 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:11.745 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:11.759 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
03-20 22:58:11.927 4986-5002/com.example.alphie.androidvideostream D/EGL_emulation: eglMakeCurrent: 0x9f6316c0: ver 3 0 (tinfo 0x9d6fe6a0)
"can't play video" error displays after hitting play button
如您所见,我拥有具有使用权限的互联网。这是我的 AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.alphie.androidvideostream">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
</application>
</manifest>
这是我的 MainActivity 的 java:
package com.example.alphie.androidvideostream;
import android.app.ProgressDialog;
import android.media.MediaPlayer;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.VideoView;
public class MainActivity extends AppCompatActivity implements
View.OnClickListener {
ProgressDialog mDialog;
VideoView videoView;
ImageButton btnPlayPause;
String videoURL = "https://youtu.be/oEgpGv2CF1U";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
videoView= (VideoView)findViewById(R.id.videoView);
btnPlayPause = (ImageButton)findViewById(R.id.btn_play_pause);
btnPlayPause.setOnClickListener(this);
}
@Override
public void onClick(View v) {
mDialog = new ProgressDialog(MainActivity.this);
mDialog.setMessage("Please wait...");
mDialog.setCanceledOnTouchOutside(false);
mDialog.show();
try
{
if(!videoView.isPlaying()) {
Uri uri = Uri.parse(videoURL);
videoView.setVideoURI(uri);
videoView.setOnCompletionListener(new
MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
btnPlayPause.setImageResource(R.drawable.ic_play);
}
});
}
else
{
videoView.pause();
btnPlayPause.setImageResource(R.drawable.ic_play);
}
}
catch (Exception ex )
{
}
videoView.requestFocus();
videoView.setOnPreparedListener(new
MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mDialog.dismiss();
mp.setLooping(true);
videoView.start();
btnPlayPause.setImageResource(R.drawable.ic_pause);
}
});
}
}
如您所见,我已经解析了 url 并正在使用 uri,这样我就可以获得远程视频。有任何想法吗?谢谢
最佳答案
https://youtu.be/oEgpGv2CF1U
指向网站,而不是视频流。视频流 URI 的示例为
。
rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov
过去可以使用 YouTube API 获取 YouTube 流 URI,但在 2015 年发生了更改。我建议您在 YouTube 应用中启动视频,详情 here .
关于java - MediaPlayer 无内容提供程序错误 : W/MediaPlayer: Couldn't open https://youtu. be/oEgpGv2CF1U : java. io.FileNotFoundException:无内容提供程序:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49395774/
我想了解 cf app 命令报告的内存状态。例如如果对于我的应用程序它返回 state since cpu memory disk
我正在从 Adobe CF10 升级到 CF2016,我注意到在 CF2016 中,对缓存查询对象的修改似乎会持久保存回缓存。这在 CF10 中似乎不是这种情况。 例如: SELECT
我的 ColdFusion 10 代码遇到了一个奇怪的问题。我是 ColdFusion 的新手,所以放轻松。之所以奇怪,是因为它似乎不会出现在该平台的旧版本(即 MX 7)中。 先来一点信息: 我有两
我对使用 Cloud Foundry 非常陌生。目前,我正在尝试使用 Cloud Foundry Java 客户端库自动执行将应用程序推送到目标 URL 的任务,但我无法弄清楚如何推送 list 文件
我目前正在制作一个响应式网站,并且正在努力完善我的 CSS。我注意到的一件事是我看过的很多网站都在使用: cf:before, .cf:after { content: " "; display: b
User CF, Item CF 需要多少数据才能给出推荐? 我手动创建了一个小数据集,所以我可以很好地理解算法是如何工作的。 我发现对于我创建的小数据集,Slope-One可以给推荐,User CF
我的.cf 文件夹位于网络映射驱动器U:\.cf 上。当我未连接到公司网络时,我收到此错误,因为驱动器不可用。我使用 Windows 7 FAILED Error read/writing confi
我正在尝试使用“cf logs my-cool-app”命令(CF 6.11 版)查看我在 Bluemix 上运行的应用程序的日志。 如果失败: FAILED Loggregator endpoint
CF-937 在补题…… D 分析 我们发现这些因子都是二进制形式的十进制数,n的范围是$1e5$,16的二进制是$10000$,于是可以枚举1~16,把这些因子预处理出来,对于每个
我的任务是将 CF 代码(大约 70 行)集成到我们的站点中,然后将其配置为与另一个站点的服务器进行通信。但是,我们的托管站点只是一个没有 CF 支持的典型服务器。代码会运行吗?我只知道 CF 是 A
我正在尝试从我的 .Net CF Window 应用程序以编程方式启动资源管理器。但是它抛出了win32异常。我在桌面 .Net 版本中使用了相同类型的代码,并且它总是有效。 (我正在使用 Windo
使用 -c 创建 tar 存档时,修改时间似乎在变化,特别是它切断了小数点后的时间,让 modtime 只是它原来的整数值。 注意: `` [localhost] $ mkdir test [loca
当我在命令提示符下使用cf ic插件时,它显示以下消息: Checking local Docker configuration... Your system was authenticated wi
我正在使用 CF8 和 SQL2000。我在 SQL 表的文本字段中存储了一堆 HTML。当我对该数据执行简单的 CFQUERY 和 CFDUMP 时,它被截断为 64000 个字符。 我已经确认我的
我有一个表单,它有一个面板,其中包含一些文本框和位于面板外的复选框。每次加载表单时,复选框都会获得焦点。 我在表单加载时放置了一个事件处理程序,并尝试将焦点设置在第一个文本框上,而不是将其放在复选框上
这是我在 ARC 下的代码: - (NSString*)encodeURL:(NSString *)string { NSString *anewString = (__bridge NSSt
我为使用 Compact Framework 的数据收集器开发软件。 我正在检查我正在调用的每个方法,我会计算这个方法执行所花费的时间。如果这个时间大于或等于 1 分钟,那么我将抛出异常。我有这个:
我想在 CF App 的环境变量中设置一个 RSA token 。 我尝试用下面的命令设置它 export var1=`cat key.pem` cf set-env app KEY "$var1"
我有一个项目列表,这些项目的格式不统一,需要排序。 item 1, item 3.0 ,item 8 , item 1.0 , item 4, item 5, item 6, ite
对于我们编写和维护的基于 CF Web 服务的 API,我们遇到了令人难以置信的令人沮丧的情况。多年来,我们拥有一个稳定的 API,可以与 Ruby、PHP 和 ColdFusion 客户端愉快地合作
我是一名优秀的程序员,十分优秀!