I got the problem in http audio play, the code is list below: same code if play local muisc is OK, but if play http stream, the player_prepare() will return negative value, BTW the internet privilege already add in manifest .
//error_code = player_set_uri(ad->player,get_resource_path(“audio/manmanfei.mp3”)); //—-> this local music is working fine
error_code = player_set_uri(ad->player, “http://music.baidutt.com/up/kwcawdks/yamkmd.mp3″);//–>this network stream is not work
dlog_print(DLOG_ERROR, LOG_TAG, “player_set_uri() = %d”, error_code);
player_set_sound_type(ad->player, SOUND_TYPE_MEDIA);
player_set_volume(ad->player, 1.0, 1.0);
how to play http audio stream
Hi,
I got the problem in http audio play, the code is list below: same code if play local muisc is OK, but if play http stream, the player_prepare() will return negative value, BTW the internet privilege already add in manifest .
error_code = player_create(&ad->player);
dlog_print(DLOG_ERROR, LOG_TAG, “player_create = %d”, error_code);
//error_code = player_set_uri(ad->player,get_resource_path(“audio/manmanfei.mp3”)); //—-> this local music is working fine
error_code = player_set_uri(ad->player, “http://music.baidutt.com/up/kwcawdks/yamkmd.mp3″);// –>this network stream is not work
dlog_print(DLOG_ERROR, LOG_TAG, “player_set_uri() = %d”, error_code);
player_set_sound_type(ad->player, SOUND_TYPE_MEDIA);
player_set_volume(ad->player, 1.0, 1.0);
error_code = player_prepare(ad->player);
dlog_print(DLOG_ERROR, LOG_TAG, “player_prepare() = %d”, error_code);
// the debug info is —–player_prepare() = -26476506
error_code = player_get_state(ad->player, state);
Best Regards,
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio