未验证 提交 52f2b137 编写于 作者: O openharmony_ci 提交者: Gitee

!6338 【媒体子系统】audio修改ContentType为CONTENT_TYPE_MUSIC

Merge pull request !6338 from liuxueqi/monthly_20221018
...@@ -92,8 +92,8 @@ describe('audioInterrupt', function () { ...@@ -92,8 +92,8 @@ describe('audioInterrupt', function () {
} }
var AudioRendererInfo = { var AudioRendererInfo = {
content: audio.ContentType.CONTENT_TYPE_RINGTONE, content: audio.ContentType.CONTENT_TYPE_MUSIC,
usage: audio.StreamUsage.STREAM_USAGE_NOTIFICATION_RINGTONE, usage: audio.StreamUsage.STREAM_USAGE_MEDIA,
rendererFlags: 0 rendererFlags: 0
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License.info(TAG + * limitations under the License.
*/ */
import audio from '@ohos.multimedia.audio'; import audio from '@ohos.multimedia.audio';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
...@@ -137,26 +137,26 @@ export default { ...@@ -137,26 +137,26 @@ export default {
}); });
console.info(TAG + 'AudioFrameworkRenderLog: Renderer after read'); console.info(TAG + 'AudioFrameworkRenderLog: Renderer after read');
await sleep(3000); await sleep(3000);
// await audioRen.drain().then(async function () { await audioRen.drain().then(async function () {
console.info(TAG + 'AudioFrameworkRenderLog: Renderer drained : SUCCESS'); console.info(TAG + 'AudioFrameworkRenderLog: Renderer drained : SUCCESS');
let wantInfo = { let wantInfo = {
want: want:
{ {
bundleName: "com.example.audiorenderinterrupt", bundleName: "com.example.audiorenderinterrupt",
abilityName: "com.example.entry.MainAbility" abilityName: "com.example.entry.MainAbility"
}, },
resultCode: 1111 resultCode: 1111
} }
featureAbility.terminateSelfWithResult(wantInfo).then(() => { featureAbility.terminateSelfWithResult(wantInfo).then(() => {
console.info(TAG + 'terminateSelf ================================== success') console.info(TAG + 'terminateSelf ================================== success')
})
.catch(() => {
console.info(TAG + 'terminateSelf ==================================== fail')
}) })
.catch(() => {
console.info(TAG + 'terminateSelf ==================================== fail')
})
// }).catch((err) => { }).catch((err) => {
// console.error('AudioFrameworkRenderLog: Renderer drain: ERROR : ' + err.message); console.error(TAG + 'AudioFrameworkRenderLog: Renderer drain: ERROR : ' + err.message);
// }); });
}, },
onDestroy() { onDestroy() {
console.log(TAG1 + 'onDestroy'); console.log(TAG1 + 'onDestroy');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册