03-10-2012 04:34 PM
Hi,
since the objects in the SDK aren'T NSCoder compliant, it isn't not possible to directly save these objects with NSKeyedArchiver. Does anyone know a way to do this?
There some playlist which are reloaded everytime our app starts, but I want to cache them to the filesystem, because there are nearly no changes of the videos in the playlist.
Thanks!
Kind Regards, Ingo
Solved! Go to Solution.
04-04-2012 01:58 PM
You can use the -toDictionary method of the BCVideo class to obtain a representation of the BCVideo object that is an NSDictionary. NSDictionary implements NSCoding, so you can persist the NSDictionary object using an NSCoder. When you read back the NSDictionary from the archive, you can pass the resulting dictionary to the -initFromDictionary method to create a BCVideo from the archived data.
04-05-2012 02:53 PM
Thanks, that worked.
I've just overlooked these two commands.
Kind Regards, Ingo Schramme
04-17-2012 08:01 PM
Hi,
is it possible to do the same for BCPlaylist?
I now can save the playlist videos to a file but getting them back doesn't work cause I just get back the video info not the info for the playlist itself.
It really would help to have a [BCPlaylist toDictionary:NSDictionary]
Thanks.
Kind Regards, Ingo
04-20-2012 09:54 AM
Hi,
again, there's a problem:
if you try the following:
BCVideo *testInput = [playlist.videos objectAtIndex:0];
NSLog(@"Input: %llu", testInput.videoId);
NSDictionary *testVideo = [BCVideo toDictionary:testInput];
NSLog(@"Output:: %@", testVideo);
Log:
Input: 1521044669001
Output: {
FLVURL = ...;
name = ...;
shortDescription = ...;
thumbnailURL = ...;
videoId = 626246217;
videoStillURL = ...;
}
as you can see, the video id is not saved properly. The Id seems to be saved as an unsigned int not as a unsigned long long.
The next problem is with initFromDictionary:
BCVideo *testOutputVideo = [BCVideo initFromDictionary:testVideo];
NSLog(@"Output from Dict: %@", testOutputVideo);
Output from Dict: BCVideo: id:0 name:...
Can you please fix it? Thanks.
Kind Regards, Ingo
05-14-2012 04:14 PM
What version of the SDK are you using? I'd need to try this myself but the videoId was changed from double to long long some time ago so in theory it should work (unless you happen to have an older SDK version)
05-15-2012 02:24 AM
Hi,
I'm using the latest SDK (2.1) thats not the problem.
I'm now rebuilding the Playlists by myself, but the problem that the ids are not saved still exist.
Just follow the example and you know what i mean.
Kind Regards, Ingo
05-24-2012 04:39 PM
I was able to reproduce and I got a fix. It should be released in the next couple of weeks, if you need early access to this version please send me a private message.
06-20-2012 09:22 AM
We released a fix for this with version 2.2
06-20-2012 09:59 AM
Hi,
is there a release date for the 2.2?
Thanks.
Cheers, Ingo
Brightcove Inc., a leading global provider of cloud content services, provides a family of products used to publish and distribute the world's professional digital media. The company's products include Brightcove Video Cloud, the market-leading online video platform, and Brightcove App Cloud, the pioneering content app platform. Together, more than 4,200 customers in 50 countries rely on Brightcove's cloud content services to build and operate exceptional media experiences across PCs, smartphones, tablets and connected TVs.
Brightcove Inc.
© 2012 Brightcove Inc.
