Skip to content
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

Merged
merged 7 commits into from
Jun 24, 2017

Conversation

ay8s
Copy link
Collaborator

@ay8s ay8s commented Jun 23, 2017

Should fix up the Video Table Example where size is not found. Reported in Slack.

maicki
maicki previously requested changes Jun 24, 2017
Copy link
Contributor

@maicki maicki left a 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)];
Copy link
Contributor

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;

@ay8s
Copy link
Collaborator Author

ay8s commented Jun 24, 2017

@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.

Copy link
Member

@nguyenhuy nguyenhuy left a 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)];
Copy link
Member

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.

Copy link
Collaborator Author

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"]];
Copy link
Member

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.

@nguyenhuy
Copy link
Member

Also, please fix Danger's warning(s). Thanks!

Copy link
Member

@nguyenhuy nguyenhuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Thanks again!

@nguyenhuy nguyenhuy dismissed maicki’s stale review June 24, 2017 22:36

Requested changes committed

@nguyenhuy nguyenhuy merged commit 0c72c4e into TextureGroup:master Jun 24, 2017
bernieperez pushed a commit to AtomTickets/Texture that referenced this pull request Apr 25, 2018
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants