{"action":"created","issue":{"url":"https://api.github.com/repos/yixia/VitamioBundle/issues/387","repository_url":"https://api.github.com/repos/yixia/VitamioBundle","labels_url":"https://api.github.com/repos/yixia/VitamioBundle/issues/387/labels{/name}","comments_url":"https://api.github.com/repos/yixia/VitamioBundle/issues/387/comments","events_url":"https://api.github.com/repos/yixia/VitamioBundle/issues/387/events","html_url":"https://github.com/yixia/VitamioBundle/issues/387","id":158915076,"number":387,"title":"Android Vitamio couldn't play HD videos.","user":{"login":"pmathew92","id":17837162,"avatar_url":"https://avatars.githubusercontent.com/u/17837162?v=3","gravatar_id":"","url":"https://api.github.com/users/pmathew92","html_url":"https://github.com/pmathew92","followers_url":"https://api.github.com/users/pmathew92/followers","following_url":"https://api.github.com/users/pmathew92/following{/other_user}","gists_url":"https://api.github.com/users/pmathew92/gists{/gist_id}","starred_url":"https://api.github.com/users/pmathew92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmathew92/subscriptions","organizations_url":"https://api.github.com/users/pmathew92/orgs","repos_url":"https://api.github.com/users/pmathew92/repos","events_url":"https://api.github.com/users/pmathew92/events{/privacy}","received_events_url":"https://api.github.com/users/pmathew92/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-07T12:52:05Z","updated_at":"2016-06-08T14:49:59Z","closed_at":null,"body":"Hey I am trying to build an app that can stream HD videos from a server . I have integrated vitamio in my app but each time I try to play an HD video(now,from my external storage) it says can't play this video.??\r\n\r\nI am attaching my code:\r\n\r\n\r\n\r\n\r\nimport android.net.Uri;\r\nimport android.os.Environment;\r\nimport android.support.v7.app.AppCompatActivity;\r\nimport android.os.Bundle;\r\nimport android.util.Log;\r\nimport io.vov.vitamio.LibsChecker;\r\n\r\npublic class MainActivity extends AppCompatActivity {\r\n    private io.vov.vitamio.widget.VideoView videoView;\r\n\r\n    private io.vov.vitamio.widget.MediaController mediaController;\r\n\r\n    @Override\r\n    protected void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n\r\n        if(!LibsChecker.checkVitamioLibs(this))\r\n            return;\r\n        setContentView(R.layout.activity_main);\r\n        videoView=(io.vov.vitamio.widget.VideoView)findViewById(R.id.vitamioView);\r\n\r\n        mediaController=new io.vov.vitamio.widget.MediaController(this);\r\n        mediaController.setAnchorView(videoView);\r\n        videoView.setMediaController(mediaController);\r\n        try{\r\n            Uri videoUri= Uri.parse(\"http://www.veoh.com/watch/v90285702kEk3RXEm\");\r\n            // videoView.setVideoURI(videoUri);\r\n           videoView.setVideoPath(Environment.getExternalStorageDirectory().getPath()+\"/video2.mp4\");\r\n        }catch(Exception e)\r\n        {\r\n            e.printStackTrace();\r\n            Log.d(\"Video Error\",e.toString());\r\n        }\r\n\r\n        videoView.requestFocus();\r\n       videoView.setOnPreparedListener(new io.vov.vitamio.MediaPlayer.OnPreparedListener() {\r\n           @Override\r\n           public void onPrepared(io.vov.vitamio.MediaPlayer mp) {\r\n               videoView.start();\r\n               mp.setPlaybackSpeed(1.0f);\r\n           }\r\n       });\r\n\r\n\r\n\r\n    }\r\n\r\n\r\n}\r\n \r\n\r\n\r\n\r\nMy Manifest File :+1: \r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    package=\"com.wizroots.sample.vitamiovideo\" >\r\n    <uses-permission android:name=\"android.permission.INTERNET\"/>\r\n    <uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>\r\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>\r\n    <uses-permission android:name=\"android.permission.WAKE_LOCK\"/>\r\n\r\n    <application\r\n        android:allowBackup=\"true\"\r\n        android:icon=\"@mipmap/ic_launcher\"\r\n        android:label=\"@string/app_name\"\r\n        android:theme=\"@style/AppTheme\" >\r\n        <activity\r\n            android:name=\".MainActivity\"\r\n            android:label=\"@string/app_name\" >\r\n            <intent-filter>\r\n                <action android:name=\"android.intent.action.MAIN\" />\r\n\r\n                <category android:name=\"android.intent.category.LAUNCHER\" />\r\n            </intent-filter>\r\n        </activity>\r\n\r\n        <!--<activity-->\r\n            <!--android:name=\"io.vov.vitamio.activity.InitActivity\"-->\r\n            <!--android:configChanges=\"orientation|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation\"-->\r\n            <!--android:launchMode=\"singleTop\"-->\r\n            <!--android:theme=\"@android:style/Theme.NoTitleBar\"-->\r\n            <!--android:windowSoftInputMode=\"stateAlwaysHidden\" />-->\r\n    </application>\r\n\r\n</manifest>"},"comment":{"url":"https://api.github.com/repos/yixia/VitamioBundle/issues/comments/224613789","html_url":"https://github.com/yixia/VitamioBundle/issues/387#issuecomment-224613789","issue_url":"https://api.github.com/repos/yixia/VitamioBundle/issues/387","id":224613789,"user":{"login":"FloridaStream","id":7586648,"avatar_url":"https://avatars.githubusercontent.com/u/7586648?v=3","gravatar_id":"","url":"https://api.github.com/users/FloridaStream","html_url":"https://github.com/FloridaStream","followers_url":"https://api.github.com/users/FloridaStream/followers","following_url":"https://api.github.com/users/FloridaStream/following{/other_user}","gists_url":"https://api.github.com/users/FloridaStream/gists{/gist_id}","starred_url":"https://api.github.com/users/FloridaStream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FloridaStream/subscriptions","organizations_url":"https://api.github.com/users/FloridaStream/orgs","repos_url":"https://api.github.com/users/FloridaStream/repos","events_url":"https://api.github.com/users/FloridaStream/events{/privacy}","received_events_url":"https://api.github.com/users/FloridaStream/received_events","type":"User","site_admin":false},"created_at":"2016-06-08T14:49:59Z","updated_at":"2016-06-08T14:49:59Z","body":"try this\r\n```javascript\r\nimport android.net.Uri;\r\nimport android.os.Environment;\r\nimport android.support.v7.app.AppCompatActivity;\r\nimport android.os.Bundle;\r\nimport android.util.Log;\r\nimport io.vov.vitamio.LibsChecker;\r\n\r\npublic class MainActivity extends AppCompatActivity {\r\nprivate io.vov.vitamio.widget.VideoView videoView;\r\nprivate String path;\r\nprivate io.vov.vitamio.widget.MediaController mediaController;\r\n\r\n@Override\r\nprotected void onCreate(Bundle savedInstanceState) {\r\n    super.onCreate(savedInstanceState);\r\n\r\n    if(!LibsChecker.checkVitamioLibs(this))\r\n        return;\r\n    setContentView(R.layout.activity_main);\r\n    videoView=(io.vov.vitamio.widget.VideoView)findViewById(R.id.vitamioView);\r\n\r\n    mediaController=new io.vov.vitamio.widget.MediaController(this);\r\n    mediaController.setAnchorView(videoView);\r\n    videoView.setMediaController(mediaController);\r\n\r\n        path = \"http://qan.vc/file/download/33594\";\r\n        videoView.setVideoURI(Uri.parse(path));\r\n\r\n    videoView.requestFocus();\r\n    videoView.setOnPreparedListener(new io.vov.vitamio.MediaPlayer.OnPreparedListener() {\r\n       @Override\r\n       public void onPrepared(io.vov.vitamio.MediaPlayer mp) {\r\n           videoView.start();\r\n           mp.setPlaybackSpeed(1.0f);\r\n       }\r\n   });\r\n }\r\n}\r\n```\r\n\r\nYour code can be improved, take a look at the examples."}}
{"actor":{"display_login":"FloridaStream"}}