-
Notifications
You must be signed in to change notification settings - Fork 27
Known Issues
#Known Issues There are known issues with the BrightcoveOS .NET-MAPI-Wrapper. Some of these are due to certain behaviors of Brightcove's REST API, and others are left by design, intended to be addressed in a future release.
##Issues relating to Brightcove's REST API behavior
-
BrightcovePlaylist -
BrightcoveAudioTrack -
BrightcoveAudioTrackPlaylist - Other
##Issues relating to the .NET-MAPI-Wrapper implementation
-
BrightcoveVideo - Other
{"error": {"name":"UnknownServerError","message":"an unknown error occurred while processing your request ","code":100}, "result": null, "id": null}There are two known workarounds for this behavior:
- Drop and recreate the playlist as an explicit playlist with the correct
VideoIdspopulated. The downside to this approach is that the original playlist would be removed from all referencing players.
private void DropAndRecreatePlaylist()
{
BrightcoveApi api = BrightcoveApiFactory.CreateApi("my API read token", "my API write token");
// 2080951888001 is the Id of a smart playlist.
BrightcovePlaylist playlist = api.FindPlaylistById(2080951888001);
// Delete the playlist.
api.DeletePlaylist(playlist.Id, true);
// Create a new playlist using the fields returned in the
// FindPlaylistById call.
// The FilterTags and TagInclusionRule properties should not be included
// since they are not used for explicit playlists.
BrightcovePlaylist newPlaylist = new BrightcovePlaylist
{
Name = playlist.Name,
// Make an explicit playlist.
PlaylistType = PlaylistType.Explicit,
ReferenceId = playlist.ReferenceId,
ShortDescription = playlist.ShortDescription,
// Use either the original VideoIds or a modified collection.
VideoIds = playlist.VideoIds
};
// Recreate the playlist.
long id = api.CreatePlaylist(newPlaylist);
}- Update the playlist to
Explicitwithout includingVideoIds, then re-update the resultantExplicitplaylist with theVideoIdsof your choosing.
private void ModifyPlaylistTwice()
{
BrightcoveApi api = BrightcoveApiFactory.CreateApi("my API read token", "my API write token");
// 2080951888001 is the Id of a smart playlist.
BrightcovePlaylist playlist = api.FindPlaylistById(2080951888001);
// Create a new playlist using the fields returned in the FindPlaylistById call.
// The FilterTags and TagInclusionRule properties should not be included
// since they are not used for explicit playlists.
// The VideoIds property should be left empty. If it is not empty, the property
// will be serialized and the error will occur.
BrightcovePlaylist newPlaylist = new BrightcovePlaylist
{
Id = playlist.Id,
Name = playlist.Name,
// Make an explicit playlist.
PlaylistType = PlaylistType.Explicit,
ReferenceId = playlist.ReferenceId,
ShortDescription = playlist.ShortDescription
};
api.UpdatePlaylist(newPlaylist);
// Now that the playlist is an Explicit playlist, you can set the VideoIds
// property.
newPlaylist.VideoIds = playlist.VideoIds;
// Reupdate the playlist with the correct VideoIds collection.
api.UpdatePlaylist(newPlaylist);
}The .NET-MAPI-Wrapper addresses this by first checking the PlaylistType of a playlist. If it is Explicit, it serializes VideoIds; otherwise, it ignores it.
However, an undocumented behavior is that this property value is returned as a property value of the returned playlist of the UpdatePlaylist method. This is the only way you can determine what the value of TagInclusionRule is for any playlist that is retrieved from Brightcove's data store.
If TagInclusionRule is omitted from any playlist in an UpdatePlaylist call, it will maintain its original value.
These properties will be included in a future release.
##`BrightcoveVideo`: Unrepresented methods There are several methods of the [Video object](http://docs.brightcove.com/en/media/#Video_Write) that Brightcove supports that are not included in the `BrightcoveApi` class. - `AddCaptioning`/`add_captioning` - `DeleteCaptioning`/`delete_captioning`This is by design as the CaptionSource and Caption objects are stated to be in BETA in Brightcove's documentation. When this designation is removed, these methods will be considered for inclusion in a future release.