-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for Video Table Example Building #383
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ay8s Thanks for fixing that. Just one small change and we are ready to go! Thanks!
_textNode.flexShrink = 1.0; | ||
|
||
[_videoNode.style setWidth:ASDimensionMake(videoNodeSize.width)]; | ||
[_videoNode.style setHeight:ASDimensionMake(videoNodeSize.height)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please change that to: _videoNode.style.preferredSize = videoNodeSize;
@maicki Adjusted that. 👍 Used it previously but thought it wasn't working as the videos weren't all loading in. Adjusted the URLs for the two which no longer exist to use one from ASDKTube. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there!
_videoNode.size = ASRelativeSizeRangeMakeWithExactCGSize(videoNodeSize); | ||
_textNode.flexShrink = 1.0; | ||
|
||
[_videoNode.style setHeight:ASDimensionMake(videoNodeSize.height)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to setHeight
separately. Please remove this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, left that in. Needed some coffee ☕️
break; | ||
|
||
case 1: | ||
// Construct the video node directly from the .mp4 URL | ||
_videoNode = [[ASVideoNode alloc] init]; | ||
_videoNode.asset = [AVAsset assetWithURL:[NSURL URLWithString:@"https://files.parsetfss.com/8a8a3b0c-619e-4e4d-b1d5-1b5ba9bf2b42/tfss-753fe655-86bb-46da-89b7-aa59c60e49c0-niccage.mp4"]]; | ||
_videoNode.asset = [AVAsset assetWithURL:[NSURL URLWithString:@"https://www.w3schools.com/html/mov_bbb.mp4"]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please extract the URL to a constant.
Also, please fix Danger's warning(s). Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Thanks again!
* Fix for Video Table Example Building * Adjust to use setPreferredSize * Change video URLs out for ones that still exist * Update header * Forgot to remove setHeight: * Extract URLs * Update license
Should fix up the Video Table Example where size is not found. Reported in Slack.