Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios NSOSStatusErrorDomain #203

Open
bradrice opened this issue Feb 27, 2024 · 2 comments
Open

ios NSOSStatusErrorDomain #203

bradrice opened this issue Feb 27, 2024 · 2 comments

Comments

@bradrice
Copy link

bradrice commented Feb 27, 2024

I'm getting this error:

0m Error trying to play from url Error Domain=NSOSStatusErrorDomain Code=1954115647 "(null)"

It doesn't happen for all my audio, but for a couple of mp3's. However, I can play them in the browser. Any idea why I might be getting this in the nativescript-audioplayer for ios? Also, the same file plays ok in android using the plugin.

@b44rd
Copy link

b44rd commented Mar 12, 2024

Experiencing the same issue. Sample mp3 file can be downloaded here.

const audio = require('nativescript-audio')

export default Vue.extend({
  mounted() {
    const player = new audio.TNSPlayer()
              player.playFromFile({
                    audioFile: "~/audio/sound.mp3",
                    loop: false,
                    autoPlay: true,
                }).then(res => {
                    console.log(res);
                })
                .catch(err => {
                    console.log('something went wrong...', err);
                })

  }
})

Packages:
"dependencies": {
"@nativescript/core": "8.6.2",
"@nativescript/theme": "3.0.2",
"nativescript-audio": "^6.2.6",
"nativescript-vue": "2.9.3"
},
"devDependencies": {
"@nativescript/android": "8.6.2",
"@nativescript/ios": "next",
"@nativescript/types": "8.6.1",
"@nativescript/webpack": "5.0.18",
"@types/node": "17.0.21",
"nativescript-vue-template-compiler": "2.9.3",
"typescript": "4.8.4",
"vue": "2.6.12"
}

@b44rd
Copy link

b44rd commented Mar 12, 2024

In my case, I had placed the file within a ~/audio folder. I moved it to the ~/assets directory, and it worked. Could be as simple as that this issue occurs when the file path is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants