question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Media Player Error: Unknown(1) - 2147483648

See original GitHub issue

What version of Streaming-Meda-Cordova-Plugin are you using? 1.0.2 What version of Cordova are you using? 6.3.0 What devices are affected? Android 4.2.2 Please describe the issue in detail, with relevant code samples simply calling the playVideo function, it returns the error in the subject:

Media Player Error: Unknown(1) - 2147483648

this is my function

playVideo: function() {
        // Where are we playing the video from?
        var videoURL = cordova.file.applicationDirectory + "www/videos/VuforiaSizzleReel_2.mp4";
        alert(videoURL);
        // Play a video with callbacks
        var options = {
          successCallback: function() {
            alert("Video was closed without error.");
          },
          errorCallback: function(errMsg) {
            alert("Error playing video: " + errMsg);
          },
          orientation: 'landscape'
        };
        window.plugins.streamingMedia.playVideo(videoURL, options);
    }

this function is called after deviceready event

the alert displays this path: file:///android_asset/www/videos/myvideo.mp4

the video is in H.264 format with AAC audio.

using another plugin (com.dawsonloudon.videoplayer) I’m able to play video, so I think it’s not a permission problem…

What did you expect to happen?

the video start to play

What actually happened?

I got the error: Media Player Error: Unknown(1) - 2147483648

PS: I tried your plugin becouse it support IOS too.

Thank you, elena.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
yogeshpatil143commented, Sep 12, 2019

Put Below Code in Your Config.xml

  1. In Platform
<platform name="android">
  <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
      <application android:usesCleartextTraffic="true" />
  </edit-config>
</platform>
  1. In the entry point of config.xml site
<widget
xmlns:android="http://schemas.android.com/apk/res/android" >
</widget>

Thanks

1reaction
chandankumarshanbhagcommented, Aug 30, 2019

Finally i found the issue According to Network security configuration (https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted) in the latest android devices cleartext support is disabled by default. so the player cannot reach out to any video on the internet to solve this issue use this stackoverflow answer https://stackoverflow.com/questions/54752716/why-am-i-seeing-neterr-cleartext-not-permitted-errors-after-upgrading-to-cordo

it works 100%

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android MediaPlayer error (1, -2147483648) - Stack Overflow
From what I have read, the error (1, -2147483648) may correspond to unsupported codecs, corrupt metadata or incorrect file headers. If it is...
Read more >
Android MediaPlayer error (1, -2147483648) - YouTube
Android : Android MediaPlayer error ( 1, - 2147483648 ) [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] Android : Android ...
Read more >
Getting Can't play this video error - MSDN - Microsoft
Video while trying to play from the https url. The video was recorded in xamarin.iOS app and uploaded to server. All these videos...
Read more >
MediaPlayer.OnErrorListener - Android Developers
onError. Added in API level 1 ... mp, MediaPlayer : the MediaPlayer the error pertains to ... MEDIA_ERROR_SYSTEM (-2147483648) - low-level system error....
Read more >
Problem with MediaPlayer.create() when recreating with same ...
MEDIA_ERROR_SYSTEM = -2147483648. and. Code (Text):. MEDIA_ERROR_UNKNOWN = 1 . I have an unknown media error from the system.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found