azure java sdk_用于 Azure 媒体服务的 Java SDK 使用入门 | Microsoft Docs

您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

用于 Azure 媒体服务的 Java 客户端 SDK 入门Get started with the Java client SDK for Azure Media Services

03/18/2019

本文内容

azure-media-services-logo-v2.svgazure-media-services-logo-v2.svg

备注

不会向媒体服务 v2 添加任何新特性或新功能。No new features or functionality are being added to Media Services v2.

查看最新版本:媒体服务 v3。Check out the latest version, Media Services v3.

本教程介绍了通过 Java 客户端 SDK 在 Azure 媒体服务中实施基本的视频内容传送服务的步骤。This tutorial walks you through the steps of implementing a basic video content delivery service with Azure Media Services using the Java client SDK.

先决条件Prerequisites

以下是完成本教程所要做好的准备:The following are required to complete this tutorial:

一个 Azure 帐户。An Azure account. 有关详细信息,请参阅 Azure 免费试用。For details, see Azure Free Trial.

一个媒体服务帐户。A Media Services account. 若要创建媒体服务帐户,请参阅 如何创建媒体服务帐户。To create a Media Services account, see How to Create a Media Services Account.

如何:导入 Azure 媒体服务 Java 客户端 SDK 包How to: Import the Azure Media Services Java client SDK package

若要开始使用用于 Java 的媒体服务 SDK,请添加 Azure 媒体服务 Java SDK 提供的 azure-media 包的当前版本 (0.9.8) 的引用。To start using the Media Services SDK for Java, add a reference to the current version (0.9.8) of the azure-media package from the Azure Media Services Java SDK

例如,如果生成工具为 gradle,请向 build.gradle 文件添加以下依赖项:For example, if your build tool is gradle, add the following dependency to your build.gradle file:

compile group: 'com.microsoft.azure', name: 'azure-media', version: '0.9.8'

重要

自 azure-media 包的版本 0.9.8 开始,SDK 添加了对 Azure Active Directory (AAD) 身份验证的支持,删除了对 Azure 访问控制服务 (ACS) 身份验证的支持。Starting with azure-media package version 0.9.8, the SDK added support for Azure Active Directory (AAD) authentication and removed support for Azure Access Control Service (ACS) authentication. 建议尽快迁移到 Azure AD 身份验证模型。We recommend that you migrate to the Azure AD authentication model as soon as possible.

备注

可以在 GitHub 存储库中找到 Azure 媒体服务的源代码。You can find the source code of the Azure Media Services Java SDK in our GitHub repository. 请确保切换到 0.9 分支而非主分支。Make sure to switch to the 0.9 branch, and not the main branch.

如何:将 Azure 媒体服务与 Java 配合使用How to: Use Azure Media Services with Java

备注

创建媒体服务帐户后,会将一个处于“已停止”状态的 默认 流式处理终结点添加到帐户。When your Media Services account is created a default streaming endpoint is added to your account in the Stopped state. 若要开始对内容进行流式处理并利用动态打包和动态加密功能,必须确保要从其流式获取内容的流式处理终结点处于“正在运行”状态。To start streaming your content and take advantage of dynamic packaging and dynamic encryption, the streaming endpoint from which you want to stream content has to be in the Running state.

以下代码演示了如何创建资产、如何将媒体文件上传到该资产、如何使用任务运行作业以转换资产,以及如何创建定位符来流式传输视频。The following code shows how to create an asset, upload a media file to the asset, run a job with a task t

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值