@@ -57,13 +57,13 @@ public static string GetEmbedCode(TwentyThreeSite site, TwentyThreePhoto photo,
57
57
return GetEmbedCode ( site . Domain , photo . PhotoId , photo . Token , playerId ) ;
58
58
}
59
59
60
- public static string GetEmbedCode ( TwentyThreeSite site , TwentyThreePhoto photo , string playerId , bool ? autoPlay , TwentyThreePhotoEmbedOnEnd onEnd ) {
61
- return GetEmbedCode ( site . Domain , photo . PhotoId , photo . Token , playerId , autoPlay , onEnd ) ;
60
+ public static string GetEmbedCode ( TwentyThreeSite site , TwentyThreePhoto photo , string playerId , bool ? autoPlay , TwentyThreePhotoEmbedEndOn endOn ) {
61
+ return GetEmbedCode ( site . Domain , photo . PhotoId , photo . Token , playerId , autoPlay , endOn ) ;
62
62
}
63
63
64
64
public static string GetEmbedCode ( TwentyThreePhotoEmbedOptions options ) {
65
65
if ( options == null ) throw new ArgumentNullException ( nameof ( options ) ) ;
66
- return GetEmbedCode ( options . Domain , options . PhotoId , options . Token , options . PlayerId , options . AutoPlay , options . OnEnd ) ;
66
+ return GetEmbedCode ( options . Domain , options . PhotoId , options . Token , options . PlayerId , options . AutoPlay , options . EndOn ) ;
67
67
}
68
68
69
69
public static string GetEmbedCode ( string domain , string photoId , string token ) {
@@ -74,7 +74,7 @@ public static string GetEmbedCode(string domain, string photoId, string token, s
74
74
return GetEmbedCode ( domain , photoId , token , playerId , null , default ) ;
75
75
}
76
76
77
- public static string GetEmbedCode ( string domain , string photoId , string token , string playerId , bool ? autoPlay , TwentyThreePhotoEmbedOnEnd ? onEnd ) {
77
+ public static string GetEmbedCode ( string domain , string photoId , string token , string playerId , bool ? autoPlay , TwentyThreePhotoEmbedEndOn ? endOn ) {
78
78
79
79
if ( string . IsNullOrWhiteSpace ( domain ) ) throw new ArgumentNullException ( nameof ( domain ) ) ;
80
80
if ( string . IsNullOrWhiteSpace ( photoId ) ) throw new ArgumentNullException ( nameof ( photoId ) ) ;
@@ -86,7 +86,7 @@ public static string GetEmbedCode(string domain, string photoId, string token, s
86
86
string url = $ "//{ domain } /{ playerId } .ihtml/player.html?token={ token } &source=embed&photo%5fid={ photoId } ";
87
87
88
88
if ( autoPlay != null ) url += "&autoPlay=1" ;
89
- if ( onEnd != default ) url += $ "&onEnd= { onEnd . ToLower ( ) } ";
89
+ if ( endOn != default ) url += $ "&endOn= { endOn . ToLower ( ) } ";
90
90
91
91
return $ "<div style=\" width:100%; height:0; position: relative; padding-bottom:100.0%\" ><iframe src=\" { url } \" style=\" width:100%; height:100%; position: absolute; top: 0; left: 0;\" frameborder=\" 0\" border=\" 0\" scrolling=\" no\" mozallowfullscreen=\" 1\" webkitallowfullscreen=\" 1\" allowfullscreen=\" 1\" allow=\" autoplay; fullscreen\" ></iframe></div>";
92
92
0 commit comments